Code, Computers & Random Junk

Install SQLite 3.10.0 in OS X

How to upgrade SQLite3 in OS X.

SQLite 3.10.0 was just released. SQLite is already installed in OS X, but it’s always nice to upgrade to a newer version, and OS X is usually kind of slow on that.

On the SQLite Download Page you can find precompiled binaries for OS X, including a sqlite3_analyzer tool.


I’m using wget.


If you haven’t done the HTTPS-fix ..» for wget, you will likely get an error about “https”. Then use: wget --no-check-certificate instead.

Verifying… You can find the checksums on the download page… If you are using my chksum ..», then you can just run:

chksum sha 048ec8430775c60c2a670e85aba1ee0d6082523b
chksum sha a13985e2cbce13e6bb3115727f8b8d58e67d9486

It will tell you “OK” or “FAILED”. +1

Unzip the files…



The OS X version sits in /usr/bin, and now with the latest version(s) of OS X there is also this new SIP which prevents installations etc in that area. So, we’ll use /usr/local/bin. Make sure that is in front of PATH in your ~/.bashrc, or ~/.bash_profile if you’re using that one.

export PATH="/usr/local/bin:/usr/local/sbin:$PATH"

To install:

sudo install -m755 sqlite3{,_analyzer} /usr/local/bin


$ which sqlite3{,_analyzer}

$ sqlite3 -version
3.10.0 2016-01-06 11:01:07 fd0a50f0797d154fefff724624f00548b5320566

Now, if you do have access to /usr/bin (disabled SIP or using an earlier version of OS X), you could back up the original file…

cd /usr/bin
sudo mv sqlite3{,.orig.bak}

# remove the exec if you want to
# sudo chmod -x sqlite3.orig.bak

…and add a symlink to the new one(s).

sudo ln -s /usr/local/bin/sqlite3 .
sudo ln -s /usr/local/bin/sqlite3_analyzer .

Happy hacking…