ZAPAnet総合情報局 > ZAPAブログ2.0 > SQLite3インストールメモ

SQLite3インストールメモ

2007年02月09日 プログラミングTIPS
SQLite home pageからsqliteの最新版をダウンロードできます。
Source Codeに同梱されているREADMEを開いてみると、このように書かれています。
tar xzf sqlite.tar.gz    ;#  Unpack the source tree into "sqlite"
mkdir bld                ;#  Build will occur in a sibling directory
cd bld                   ;#  Change to the build directory
../sqlite/configure      ;#  Run the configure script
make                     ;#  Run the makefile.
make install             ;#  (Optional) Install the build products
この手順に従ってインストールしてみます。
wget https://www.sqlite.org/sqlite-3.3.12.tar.gz
tar zxvf sqlite-3.3.12.tar.gz
mkdir bld
cd bld
../sqlite-3.3.12/configure
make
ところが、make時にエラー発生しました。
make: *** [tclsqlite.lo] Error 1
エラーが出たので、configureオプションを変更。
make clean
../sqlite-3.3.12/configure --disable-tcl
make
make install

最新版のsqlite3でが"ALTER TABLE"構文が使えるようになっています。
テーブル名の変更とカラムの追加だけですが、何もなかった今までよりは全然使いやすいですね。

参考:
PHP: SQLite 関数 - Manual