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

64 views
Skip to first unread message

Josiah Ulfers

unread,
Aug 18, 2021, 4:40:48 PM8/18/21
to postgi...@lists.osgeo.org
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
https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-re
dhat-repo-latest.noarch.rpm
...
$ yum install postgis31_12
...
$ sqlite3 --version
SQLite header and source version mismatch
2019-10-10 20:19:45
18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3dfalt1
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
/usr/sqlite330/lib/
$ which sqlite3
/bin/sqlite3
$ find / -name sqlite3
/usr/bin/sqlite3
/usr/lib64/python2.7/sqlite3
/usr/sqlite330/bin/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
18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3dfalt1

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?

Thanks
_______________________________________________
postgis-users mailing list
postgi...@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

Paul Ramsey

unread,
Aug 18, 2021, 5:41:33 PM8/18/21
to PostGIS Users Discussion
RPM build issues should be filed with the pdgd redmine

https://redmine.postgresql.org/projects/pgrpms/

I'm not sure there's a good fix for the problem though... replacing/removing the old version is not allowed for the new package because the new package is not system-wide, it's part of the attempt by pgdg to vendor in specific versions while leaving the system (mostly) alone.

P

Josiah Ulfers

unread,
Aug 20, 2021, 5:19:45 PM8/20/21
to PostGIS Users Discussion
Thanks, even if there turns out to be no good fix, I filed for posterity:
https://redmine.postgresql.org/issues/6702

-----Original Message-----
From: postgis-users <postgis-us...@lists.osgeo.org> On Behalf Of
Paul Ramsey
Sent: Wednesday, August 18, 2021 5:41 PM
To: PostGIS Users Discussion <postgi...@lists.osgeo.org>
Subject: Re: [postgis-users] Installing pgdg Postgis 3.1 on CentOS/Rhel7
breaks sqlite3 cli

RPM build issues should be filed with the pdgd redmine

https://redmine.postgresql.org/projects/pgrpms/

I'm not sure there's a good fix for the problem though...
replacing/removing the old version is not allowed for the new package
because the new package is not system-wide, it's part of the attempt by
pgdg to vendor in specific versions while leaving the system (mostly)
alone.

P
Reply all
Reply to author
Forward
0 new messages