Centos7 python2.7 安装pysqlcipher
前提条件
首先,安装python-pip,python-devel,sqlite,sqlite-devel,openssl,openssl-devel,git等
交叉编译sqlcipher
下载sqlcipher
- 下载地址:https://github.com/sqlcipher/sqlcipher
- 命令: git clone https://github.com/sqlcipher/sqlcipher.git
- 编译:./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
- 安装:make && make install
- 安装完后运行命令:ln -s /usr/local/lib/libsqlcipher.so.0 /usr/lib64/libsqlcipher.so.0
- 若不添加软链接,则在引用pysqlcipher包的时候会报错
安装pysqlcipher
- 命令:pip install pysqlcipher