下载 sqlite-3.3.6.tar.gz
解压并拷贝至你想要安装到的目录下,我选择的是/usr/local/sqlite-3.3.6
接着在终端里:
# cd /usr/local/sqlite-3.3.6
# ./configure
# make
# make install
# make doc make 的时候提示错误
../sqlite-3.3.6/src/tclsqlite.c: In function `DbUpdateHandler":
../sqlite-3.3.6/src/tclsqlite.c:333: warning: passing arg 3 of `Tcl_ListObjAppendElement" makes pointer from integer without a cast
……
这个都是tcl 相关的错误, 可以先安装ActiveTcl 以解决. 假如你不需要tcl 支持, 那么这个错误可以这样避免:
# ./configure --disable-tcl --prefix=/usr/local/sqlite-3.3.6
# make 如果提示没有可以编译的文件,则是第一次make 时已经执行过了,接着下面做就可以了;如果此次是第一次编译,应该不会再提示出错了
# make install
# make doc 测试是否安装成功
# cd /usr/lcoal/sqlite-3.3.6
# ./sqlite3 text.db // 这也是进入数据库的方法如果安装成功,会出现下面这样的信息
SQLite version 3.3.6
Enter ".help" for instructions
sqlite>
接下来就可以自由操作啦,和在windows 下是一样的啦。 二、 SQLite 基本操作 如以下操作:创建表、插入、查询: sqlite> create table tbl1(one varchar(10), two smallint);
sqlite> insert into tbl1 values("hello!",10);
sqlite> insert into tbl1 values("goodbye", 20);
sqlite> select * from tbl1;
hello!|10
goodbye|20
sqlite> 注意每句SQL 语句后一定要有分号 semicolon 。 Special commands to sqlite3 : sqlite> .help .databases List names and files of attached databases
.exit Exit this program .output FILENAME Send output to FILENAME
.output stdout Send output to the screen .tables List the tables
Ubuntu 10.04下PostgreSQL 8.4 安装配置嵌入式Linux之我行——嵌入式数据库SQLite在2440上的移植相关资讯 sqlite Linux教程
- Ubuntu 16.04 安装可视化数据库浏 (05月20日)
- iOS 数据库比较:SQLite vs. Core (03月01日)
- 如何在 Ubuntu 15.04 上安装带 (02月09日)
| - 微软推荐通用 Windows 应用开发者 (05月04日)
- SQLite 3.11.0 发布下载 (02月17日)
- SQLite 3.10.2 发布下载 (01月29日)
|
本文评论 查看全部评论 (0)