Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I install or upgrade to sqlite 3.33.0 on Ubuntu 18.04?

I'm currently running Ubuntu 18.04 with SQLite3. SQLite 3 is at version 3.22.0 and I need to upgrade it to version 3.33.0 to take advantage of new functionality that is available. If I remove and reinstall SQLite3 with apt-get, it just re=installs 3.22.0. How can I upgrade to the latest version of SQLite3?

like image 482
Mike Collins Avatar asked Feb 03 '26 05:02

Mike Collins


1 Answers

I have tried to compile the latest sqlite3 from source and it does not work with the packages of Ubuntu 18.04.

Eventually, I upgraded my Ubuntu to 20.04(Focal Fossa), and it comes with Sqlite 3.31.

If you want the latest Sqlite 3.34(at the time of this post), you need to download and build it yourself.

The steps are pretty straight forward.

Step 1 - Download the Source code

wget https://sqlite.org/2021/sqlite-autoconf-3340100.tar.gz

Step 2 - Extract the tarball

tar -xvf sqlite-autoconf-3340100.tar.gz && cd sqlite-autoconf-3340100

Step 3 - Configure

sudo apt-get install libreadline-dev
./configure

Step 4 - Make

make

Step 4.5 - Get rid of the old version

sudo apt-get purge sqlite3

Step 5 - Make Install

sudo make install

Step 6 - Add to path

export PATH="/usr/local/bin:$PATH"  # also add in your .bashrc

Step 7 - Verify the installation

sqlite3 --version
3.34.1 2021-01-20 14:10:07 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ebd1f
like image 132
divinedragon Avatar answered Feb 04 '26 19:02

divinedragon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!