在ubuntu上构建sqlcipher

时间:2012-05-20 07:53:54

标签: linux sqlite ubuntu sqlcipher

您好我正在尝试在ubuntu上构建sqlcipher(最小11.10)。在Mac OS X上,我没有遇到任何问题。

我按照sqlcipher.net的说明操作。第一步是配置。我尝试使用以下命令执行configure:

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

但是我收到以下错误消息:“configure:error:C编译器无法创建可执行文件”

在config.log中,有些线条引起了我的注意,但我不知道如何修复它:

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

有人在ubuntu上成功构建了sqlcipher吗?此致

1 个答案:

答案 0 :(得分:1)

您需要安装GNU编译器工具链才能从源代码构建。在终端中执行以下命令。

$ sudo apt-get install build-essential
相关问题