[postgis-users] Installing pgdg Postgis 3.1 on CentOS/Rhel7 breaks sqlite3 cli

Josiah Ulfers josiah.ulfers at nltgis.com
Wed Aug 18 13:40:04 PDT 2021

Hi, it seems that yum-installing Postgis 3.1 on CentOS 7 or Rhel 7 causes
the sqlite3 command to exit with error anytime it's invoked. Is this a
bug, by design, or am I missing something?

On a fresh CentOS 7:

$ sqlite3 --version
3.7.17 2013-05-20 00:56:22 118a3b35693b134d56ebd780123b7fd6f1497668
$ yum install epel-release
$ yum install postgis31_12
$ sqlite3 --version
SQLite header and source version mismatch
2019-10-10 20:19:45
2013-05-20 00:56:22 118a3b35693b134d56ebd780123b7fd6f1497668

Postgis depends on a custom sqlite33 package from pgdg:

$ yum list installed sqlite*
sqlite.x86_64          3.7.17-8.el7_7.1   @anaconda
sqlite33.x86_64        3.30.1-6.rhel7     @pgdg-common
sqlite33-libs.x86_64   3.30.1-6.rhel7     @pgdg-common

And it seems that sqlite33 puts its libraries on the load path before the
default sqlite rpm that ships with CentOS and Rhel 7, but sqlite33 doesn't
replace the default sqlite3 executable:

$ cat /etc/ld.so.conf.d/sqlite33-pgdg-libs.conf
$ which sqlite3
$ find / -name sqlite3

Workaround 1: ensure the default libraries get priority

$ LD_LIBRARY_PATH=/usr/lib64 sqlite3 --version
3.7.17 2013-05-20 00:56:22 118a3b35693b134d56ebd780123b7fd6f1497668

Workaround 2: invoke the sqlite3 from the pgdg package

$ /usr/sqlite330/bin/sqlite3 --version
3.30.1 2019-10-10 20:19:45

This feels like a bug in the rpm packaging, though other ideas are
welcome. Assuming it's not intentional, is https://trac.osgeo.org/postgis/
a good place to file it, or is somewhere else more appropriate?


More information about the postgis-users mailing list