赞
踩
首先进入官网下载
链接: 链接:https://pan.baidu.com/s/1epIYv9Bz3hOU1WyQcbnr8Q
提取码:fann
tar xvzf sqlite-autoconf-3450200.tar.gz
cd sqlite-autoconf-3450200
./configure --prefix=/usr/local
make
make install
这里可能会报错
make[1]: Entering directory '/home/fdd/SQLite3/sqlite-autoconf-3450200'
/bin/mkdir -p '/usr/local/lib'
/bin/bash ./libtool --mode=install /usr/bin/install -c libsqlite3.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libsqlite3.so.0.8.6 /usr/local/lib/libsqlite3.so.0.8.6
/usr/bin/install: cannot create regular file '/usr/local/lib/libsqlite3.so.0.8.6': Permission denied
Makefile:470: recipe for target 'install-libLTLIBRARIES' failed
make[1]: *** [install-libLTLIBRARIES] Error 1
make[1]: Leaving directory '/home/fdd/SQLite3/sqlite-autoconf-3450200'
Makefile:915: recipe for target 'install-am' failed
make: *** [install-am] Error 2
解决:使用
sudo make install
sqlite3
https://www.sqlite.org/download.html
打开cmd输入sqlite3,出现版本号则证明成功安装
sqlite3
如果安装失败,重启一下,可能是环境变量没有生效
sqlite3 /home/fdd/SQLite3/test.db
create table usrInfo(id integer primary key autoincrement, name varchar(32),pwd varchar(32));
.tables
insert into usrInfo(name, pwd) values ('jack', 'jack'), ('rose', 'rose'), ('lucy', 'lucy');
select * from usrInfo
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。