linux Python pysqlite2安装的方法 sqlite3升级数据库
# flexget check2018-03-20 06:34 VERBOSEmanager Creating new database /etc/flexget/db-config.sqlite - DO NOT INTERUPT ...
FATAL: Unable to use SQLite. Are you running Python 2.7, 3.3 or newer ?
Python should normally have SQLite support built in.
If you're running correct version of Python then it is not equipped with SQLite.
You can try installing `pysqlite`. If you have compiled python yourself, recompile it with SQLite support.
Error: /usr/local/lib/python2.7/site-packages/pysqlite2/_sqlite.so: undefined symbol: sqlite3_stmt_readonly
#
一些程序报错,手动安装
yum -y install sqlite-devel
wget https://pypi.python.org/packages/42/02/981b6703e3c83c5b25a829c6e77aad059f9481b0bbacb47e6e8ca12bd731/pysqlite-2.8.3.tar.gz#md5=033f17b8644577715aee55e8832ac9fc
pysqlite-2.8.3.tar.gz
tar xzf pysqlite-2.8.3.tar.gz
cd pysqlite-2.8.3
python setup.py install
错误也没有解决,其实这个贴也是扯淡的,,不过有了点经验,可能是其它原因,根据上面的报错,打印看到sqlite相关的只有/usr/lib64/libsqlite3.so.0没有结果,说明问题出在sqlite版本上,可能当前的sqlite版本太老,没有提供sqlite3_stmt_readonly这个函数
nm /usr/local/lib/python2.7/site-packages/pysqlite2/_sqlite.so | grep sqlite3_stmt_readonly
U sqlite3_stmt_readonly
ldd /usr/local/lib/python2.7/site-packages/pysqlite2/_sqlite.so
linux-vdso.so.1 =>(0x00007ffc20074000)
libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00007fd514e95000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fd514c78000)
libc.so.6 => /lib64/libc.so.6 (0x00007fd5148e3000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fd5146df000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd515340000)
打印当前版本号
sqlite3 -version
3.6.20
我们升级下。。。
wget https://www.sqlite.org/2018/sqlite-autoconf-3220000.tar.gz
tar xvzf sqlite-autoconf-3220000.tar.gz
cd sqlite-autoconf-3220000
./configure
make -j 4
make install
然后再打印版本号,,,怎么没变?
# sqlite3
SQLite version 3.22.0 2018-01-22 18:45:57
这里倒是看到变动了
后面,,,又不知道怎么办了,,之后再补充
补充。。
特么直接
yum -y install sqlite-devel
然后,重新编译Python安装就好了
页:
[1]