# Compiling SQLCipher CLI for m1 Mac

**URL:** <https://discuss.zetetic.net/t/compiling-sqlcipher-cli-for-m1-mac/5531>\
**Category:** SQLCipher\
**Created:** [August 29, 2022, 1:05pm UTC](https://discuss.zetetic.net/t/compiling-sqlcipher-cli-for-m1-mac/5531 "2022-08-29T13:05:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![epoberezkin](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/epoberezkin/32/1860_2.png) [@epoberezkin](https://discuss.zetetic.net/u/epoberezkin)\
**Post date:** [August 29, 2022, 1:05pm UTC](https://discuss.zetetic.net/t/compiling-sqlcipher-cli-for-m1-mac/5531/1 "2022-08-29T13:05:48Z")

</div>

Sorry if this is covered elsewhere, but I didn’t manage to find it.

I am trying to compile CLI on m1 Mac.

If I run `configure && make` it compiles ok, and CLI works with SQLite databases, but when I am trying to migrate it to encrypted database it errors:

```auto
Parse error: no such function: sqlcipher_export
  SELECT sqlcipher_export('encrypted');
         ^--- error here

```

If I run:

```auto
../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"

```

or

```auto
../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="/usr/local/lib/libcrypto.a"

```

as readme suggested it compiles to a larger sqlcipher file (~4.5mb vs 1.5mb) but it fails to run with:

```auto
zsh: killed sqlcipher

```

I also tried to migrate in DB Browser for SQLite, but it failed on ATTACH:

```auto
Result: unable to open database: ...

```

I am clearly missing something, please help!
