3

I am trying to upgrade my sqlite3-devel to 3.35.4. I can download and install the sqlite binary for the standard sqlite3 program but I cannot find a way to get the development version of sqlite3 version 3.35.4.

I need to update Proj to Proj8 which requires sqlite3 => 3.11

CentOS repos only support sqlite3 3.7.17.

How can I get sqlite3 3.35.4 "dev" or "devel" installed on CentOS 7?

fvlasie
  • 73
  • 10

1 Answers1

2

First install gcc and wget:

sudo yum install gcc wget

Then have a read at Where can one find source archives of old SQLite versions? to find out how to download a specific version of SQLite in .zip format.

Try the .tar.gz archive for Linux (I think the .zip is for Windows).

So for your version 3.35.4, the .tar.gz download link will be at: https://www.sqlite.org/2021/sqlite-autoconf-3350400.tar.gz

The file naming convention of the above path was from looking at the latest .tar.gz download link from https://www.sqlite.org/download.html.

Download the .tar.gz archive:

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

Extract it:

tar -xvf sqlite-autoconf-3350400.tar.gz

Make a build directory and change directory to it:

mkdir build
cd build

Run the configure script

../sqlite-autoconf-3350400/configure

Compile:

make

Install it:

sudo make install

Read carefully the output as it'll tell you where it installs to.

Confirm the version:

$ grep Version /usr/local/lib/pkgconfig/sqlite3.pc
Version: 3.35.4
kso
  • 121
  • 1
  • 5
  • Hey there. Followed this to the letter. sqlite3 installed. (Libraries have been installed in: /usr/local/lib). But still seeing `Requested 'sqlite3 >= 3.11' but version of SQLite is 3.7.17` error when installing proj. Are there extra steps required? Error suggests ` Consider adjusting the PKG_CONFIG_PATH environment variable` or `set the environment variables SQLITE3_CFLAGS and SQLITE3_LIBS to avoid the need to call pkg-config`... Any clues? – monkey May 30 '23 at 01:48
  • You might already have another version of SQLite installed? Try `rpm -qa | grep -i sqlite` to check. – kso May 31 '23 at 11:42
  • Fixed by adding : ```ENV SQLITE3_CFLAGS="-I$sqliteDir/include" \ SQLITE3_LIBS="-L$sqliteDir/lib -lsqlite3"``` – monkey Jun 01 '23 at 06:11