How to upgrade/update the sqlite3 version on your Mac
First check to see which version of sqlite3 you want to upgrade to and figure out what the URL for the tar ball is. In this example, I want to upgrade to version 3.6.18
Visit SQLite3 Download Page
Here is one way to do it:
mkdir ~/src
cd ~/src
curl http://www.sqlite.org/sqlite-3.6.18.tar.gz | tar xvfz
cd sqlite-3.6.18
autoconf
./configure –prefix=/usr/local
make
sudo make install
# check what version of SQLite is installed
sqlite3 –version
# 3.6.18
which sqlite3
# /usr/local/bin/sqlite3
5 Comments to “How to upgrade/update the sqlite3 version on your Mac”
Leave a Reply


There are a couple of gotchas:
curl http://www.sqlite.org/sqlite-3.6.18.tar.gz | tar xvfz
delete the f switch otherwise tar expects an argument to follow.
./configure –prefix=/usr/local
The long dash before should be replaced by –(double dash).
This works:
mkdir ~/src
cd ~/src
curl http://www.sqlite.org/sqlite-3.6.18.tar.gz | tar xvz
cd sqlite-3.6.18
autoconf
./configure –prefix=/usr/local
make
sudo make install
# check what version of SQLite is installed
sqlite3 –version
# 3.6.18
Move /usr/local/bin/sqlite3 to /usr/bin/sqlite3
This will overwrite the old sqlite3 with the new version. The new binary is created in /usr/local/bin since the instructions given here specifies this directory as the prefix.
Does this overwrite the system install version of sqlite (3.4.0 on my mac mini)?
Both –version and which sqlite3 show that after following these steps I’m still running 3.4.0 and its looking to /usr/bin/sqlite3.
I’m not sure if this will solve your issue but you may want to look at http://forums.sun.com/thread.jspa?threadID=5327133
I am getting this error
curl: (6) Couldn’t resolve host ‘www.sqlite.org’
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error exit delayed from previous errors
admins-mac-pro:src admin$