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

VN:F [1.9.13_1145]
Rating: 4.0/5 (1 vote cast)
VN:F [1.9.13_1145]
Rating: 0 (from 2 votes)
How to upgrade/update the sqlite3 version on your Mac, 4.0 out of 5 based on 1 rating

5 Comments to “How to upgrade/update the sqlite3 version on your Mac”

  1. RonOnRails 11 May 2011 at 2:11 am #

    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

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: +1 (from 1 vote)
  2. jamini 4 January 2011 at 3:05 pm #

    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.

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)
  3. niblettes 20 October 2010 at 12:35 pm #

    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.

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: +1 (from 1 vote)
  4. navid 19 September 2010 at 8:46 am #

    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

    VN:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.13_1145]
    Rating: 0 (from 0 votes)
  5. rahulvyas 20 February 2010 at 12:45 am #

    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$

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)

Leave a Reply