卸载MySQL,安装SQLite

来源:互联网 发布:淘宝转卖闲鱼怎么发货 编辑:程序博客网 时间:2024/05/17 05:51
环境:Debian
卸载MySQL:
#sudo apt-get autoremove --purge mysql-server-5.0
出现是否继续选项时,选y
Do you want to continue [Y/n]? y
出现warning,可以卸载完成后手动删除/etc/mysql。
dpkg: warning: while removing mysql-common, directory '/etc/mysql' not empty so not removed

安装SQLite:
下载安装包。最新版本是sqlite-3.8.5。
#wget http://www.sqlite.org/2014/sqlite-autoconf-3080500.tar.gz
解压缩。
#tar -xzvf sqlite-autoconf-3080500.tar.gz
检查并设置安装环境。
#./configure
编译源程序,这可能会较长时间,测试时间为1小时加2分钟。
#make
完成安装。
#make install

在终端输入sqlite3,报错
-bash: sqlite: command not found
是因为/usr/lib/arm-linux-gnueabihf目录下有老版本的libsqlite3.so.0和libsqlite3.so.0.8.6。而新安装的sqlite的库文件在/usr/local/lib目录下。解决方案是修改/etc/ld.so.conf,加入路径/usr/local/lib。
#vi /etc/ld.so.conf

include /etc/ld.so.conf.d/*.conf
/usr/local/lib

wq保存退出。

测试是否安装成功。
#sqlite3
输出
SQLite version 3.8.5 2014-06-04 14:06:34
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite>
说明安装成功了。

http://www.sqlite.org/threadsafe.html

http://www.sqlite.org/c3ref/threadsafe.html 







0 0