How to Install SQLite on Fedora 37 or 36


SQLite is free, open-source software that is not a client-server database engine but is embedded into the end program.SQLite is ACID-compliant and implements most SQL standards, generally following PostgreSQL syntax. However, SQLite uses a dynamically and weakly typed SQL grammar that does not guarantee the domain integrity of data inserted into a column designated with one data type will be of that type. Various programming languages support SQLite, including C, C++, Go, JavaScript, Java, .NET Framework 4.5+, Objective-C, Perl 5.24+, PHP 5+, Swift 3+, and many more through language-specific libraries and extensions are also available to improve performance and add additional features such as full-text search and spatial indexing.

The following tutorial will teach you how to install SQLite with Fedora 37/36/35 Linux using the command line terminal using the standard DNF package manager or manually installing straight from the project’s Git for users that require the latest version at all times.

Recommended Steps Before Installation.

First, update your system to ensure all packages are up-to-date to avoid any conflicts during the installation.

sudo dnf upgrade --refresh

#1st Method: Install SQLite 3 – Fedora Repository

The first option and recommended to start with is to install SQLite 3 from the default appstream. To begin the installation, use the following command in your terminal.

sudo dnf install sqlite3

Next, verify the version of SQLite 3 with the –version command.

sqlite3 --version

#2nd Method: Install SQLite 3 – Download & Compile

As many users would know, the version featured in the default repository is not always the most up-to-date, and compiling can give you the latest, or for that matter, preferred version.

First, visit the SQLite Download page, grab the latest version link, and download it using the wget command.

wget https://www.sqlite.org/2022/sqlite-autoconf-{version}

Example:

wget https://www.sqlite.org/2022/sqlite-autoconf-3400000.tar.gz

Please remember to check for the newer version using the link mentioned; the above command is an example only and should not just be directly copied.

Extract the files to the directory you just created.

Example:

tar xvfz sqlite-autoconf-*.tar.gz

Now, you will navigate to the folder to begin compiling SQLite.

cd sqlite-autoconf-{replace with version}

Begin the compiling process using the following command.

./configure --prefix=/usr

Example output:

configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: executing depfiles commands
config.status: executing libtool commands

The following process uses the (make) command to start the build process. A better way to do this is to specify the number of cores you want to use in compiling to speed up the process.

make -j 2

Note that the (-j) corresponds to the number of cores in your system to speed up the build time. You can set this as high as possible if you have a powerful server; if you don’t, it will be the default option of 1. To find out how many cores you have on your system, execute the following code:

nproc

For example, your machine has two cores, so in the (make) command, you will use (-j 2). However, if you have 12 cores, you could have (-j 6) cores and dedicate half or more to the process.

Once the build process is complete, begin the installation using the following command.

sudo make install

Example output:

example sqlite installed on fedora linuxPin

Once installed, verify the installation and the version number.

sqlite3 --version

Example output:

[joshua@fedora-linux sqlite-autoconf-3400000]$ sqlite3 --version
3.40.0 2022-11-16 12:10:08 89c459e766ea7e9165d0beeb124708b955a4950d0f4792f457465d71b158d318

For more information, visit the SQLite official documentation page.

See also
How to Install OnlyOffice on Fedora Linux

Leave a Comment

Share to...