Archive for May 10th, 2009

Getting back sqlite3 to Mac OS X

For some reason, I lost my SQLite version from my Mac OS X 10.5 Leopard. I hardly suspect MonoFramework for the “damage” caused, as /usr/bin/sqlite3 has been replaced with a link to a non-existent file from MonoFramework Library.

A quick and dirty fix is to bring back the sqlite3 source and install it in the *nix fashion (configure, make, make install). For future reference, I am listing the full sequence of commands I’ve typed in Terminal:

curl http://www.sqlite.org/sqlite-3.6.14.tar.gz | tar zx
cd sqlite-3.6.14
autoconf
./configure --prefix=/usr/local
make
sudo make install
# check if SQLite is installed properly
sqlite3 --version
# 3.6.14
which sqlite3
# /usr/local/bin/sqlite3

Note the new path: prefix=/usr/local, so the CLI (command line interface) sqlite3 will be accessible via /usr/local/bin/sqlite3. As sqlite is part of the core Mac, I believe it is wise not to interfere with any of the original libraries (not only CLI).

Do you know a “cleaner”, Mac OS X like (.dmg) way to restore SQLite? Please comment.