1、安装sqlite3
官网下载www.sqlite.org
tar xf qlite-autoconf-3080403.tar.gz
cd qlite-autoconf-3080403
./configure
make & make install
2、安装sqlite3的开发包
yum install sqlite-devel
3、安装Python2.7(如果已经安装Python则重新编译一次覆盖)
官网下载www.python.org
tar xf Python-2.7.6.tgz
cd Python-2.7.6
./configure LDFLAGS='-L/home/wjiax/sqlite-autoconf-3080403/.libs' CPPFLAGS='-I/home/wjiax/sqlite-autoconf-3080403'
make && make install
cp ./build/lib.linux-i686-2.7/_sqlite3.so /usr/local/python2.7/lib/python2.7/lib-dynload/
解决Python2.7和sqlite3的依赖问题
shell>python
shell>>>import sqlite3
shell>>>
到此安装成功
主要在于要将sqlite3编译后的so文件拷贝到Python文件夹下面