linux下安装sqlite及遇到的问题

来源:互联网 发布:芭比布朗和mac化妆刷 编辑:程序博客网 时间:2024/05/29 09:00

 安装

去sqlite主页http://www.sqlite.org/.跳转到下载也http://www.sqlite.org/download.html。源码下载ssqlite-autoconf-3080300.tar.gz(1.83 MiB)


进入下载目录,解压文件tar -zxvf sqlite-autoconf-3080300.tar.gz

解压后生成sqlite-autoconf-3080300.目录. cd 进入。

./configure

make

sudo make install

安装完成。


结果出现了问题:SQLite header and source version mismatch

网上解决方案:其实sqlite默认安装到了/usr/local/lib中,但是系统旧的sqlite库在/usr/lib/i386-linux-gnu里,而这个目录被搜索的优先级目测应该高于/usr/local/lib。我把旧的libsqlite3.so.0, libsqlite3.so.0.8.6删除就能打开sqlite3了。


删掉文件后又出现了问题:qlite3: error while loading shared libraries: libsqlite3.so.0: cannot open shared object file: No such file or directory


感觉更加严重了,直接找不到文件了……

继续搜索解决方案:

You might be using a different version of Ubuntu but chances are this will work http://ubuntuforums.org/showthread.php?t=1883976



sudo apt-get purge sqlite3 sqlite3-doc libsqlite3-0


sudo apt-get install sqlite3 sqlite3-doc


if you can use a terminal this should be fast and easy.


执行了sudo apt-get purge sqlite3 sqlite3-doc libsqlite3-0后正常了 



终于可以用sqlite3了




0 0
原创粉丝点击