How to Install the Latest Version of SQLite3

Updated on November 21, 2023
How to Install the Latest Version of SQLite3 header image

Introduction

SQLite is the most widely used database engine globally, and there are client libraries available for almost all popular languages. Most Linux distributions can install SQLite3 from their repositories. However, the repository version may be outdated or miss newer features in the latest SQLite3. In this tutorial, we will compile the latest version of SQLite3 from source code.

Prerequisites

You must have the following packages installed.

  • wget
  • tar

You must install the build tool-chain for your distribution.

For Debian or Ubuntu, install build-essential.

$ sudo apt-get install build-essential

CentOS or RHEL users:

# yum update
# yum groupinstall "Development Tools"

Fedora users:

# dnf update
# dnf groupinstall "Development Tools"

Other distributions should install similar packages that include a C compiler, linker and make utility.

1. Download the Source Code

Navigate to https://www.sqlite.org/download.html and copy the link to the latest autoconf amalgamation source code, which will be named:

sqlite-autoconf-<version>.tar.gz

Extract the tar file.

$ cd ~
$ mkdir sqlite3 && cd sqlite3
$ wget [link to sqlite-autoconf-<version>.tar.gz]
$ tar xvfz sqlite-autoconf-<version>.tar.gz

2. Build & Install SQLite3

Build and install SQLite3 using the following commands:

$ cd sqlite-autoconf-<version>
$ ./configure
$ make
$ sudo make install

3. Verify the Installation

Verify the SQLite3 installation.

$ sqlite3 --version

Conclusion