Search code examples
macossqlitemacos-high-sierra

Why do I have two versions of sqlite?


On my iMac (10.13.6, which is as far as it can be upgraded), I typed sqlite3 and it said I was running version 3.19.3.

So I tried upgrading with brew upgrade sqlite3 but it said sqlite3 3.28.0 already installed. The SQLite site says 3.28.0 is currently the most up to date version.

How come I have two different versions of SQLite? Does Brew install to a different location than the standard OSX version? And if so, how do I either use the upgraded brew version or upgrade the OSX version?


Solution

  • In general, homebrew installs links for all binaries it installs in /usr/local/bin. You can see that by running:

    ls -l /usr/local/bin
    

    So, you need to add that directory to your PATH:

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

    You likely want to do this in your login profile, which is probably $HOME/.profile so that it gets set every time you login.