Build sqlcipher on ubuntu

梦想的初衷 提交于 2019-12-11 05:12:25

问题


Hi I'm trying to build sqlcipher on ubuntu (11.10 minimal). On Mac OS X I had no problems though.

I followed the instructions from sqlcipher.net. First step was configure. I tried to execute configure with the following command:

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

but I got the following error message: "configure: error: C compiler cannot create executables"

In the config.log some lines caught my eyes but I don't know how to fix it:

gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) 
configure:2544: $? = 0
configure:2551: gcc -V >&5
gcc: error: unrecognized option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2555: $? = 4
configure:2578: checking for C compiler default output file name
configure:2600: gcc -DSQLITE_HAS_CODEC  -lcrypto conftest.c  >&5
/usr/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status

Has anybody successfully build sqlcipher on ubuntu yet? Regards


回答1:


You will need to install the GNU compiler toolchain in order to build from source. Execute the following command in a terminal.

$ sudo apt-get install build-essential


来源:https://stackoverflow.com/questions/10671741/build-sqlcipher-on-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!