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

Paul Ramsey pramsey at cleverelephant.ca
Wed Aug 18 14:41:25 PDT 2021


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

> On Aug 18, 2021, at 1:40 PM, Josiah Ulfers <josiah.ulfers at nltgis.com> wrote:
> 
> 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
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users



More information about the postgis-users mailing list