Search Postgresql Archives

Re: postgresql15-contrib installation on Amazon Linux 2 fails on Python shared lib dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Thu, Apr 27, 2023 at 8:51 AM Max Kremer <mkremer@xxxxxxxxxxxxx> wrote:



I'm using an EC2 on AWS running Amazon Linux 2. I'm trying to install Postgresql version 15 server along with the contrib libraries for various extension.

This is how I installed Posgres15

sudo rpm --import https://yum.postgresql.org/RPM-GPG-KEY-PGDG-15
sudo yum update -y
sudo yum install -y postgresql15-server postgresql15-contrib

PostgreSQL server installs correctly but fails during the contrib package install due to a dependency on Python. I am able to install just the server alone:

 sudo yum install -y postgresql15-server

Here is the error I get when installing postgresql15-contrib:

[ec2-user@ip-172-31-51-199 ~]$ sudo yum install -y  postgresql15-contrib 
Loaded plugins: dkms-build-requires, extras_suggestions, langpacks, priorities, update-motd
225 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package postgresql15-contrib.x86_64 0:15.2-1PGDG.rhel7 will be installed
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: postgresql15-contrib-15.2-1PGDG.rhel7.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: postgresql15-contrib-15.2-1PGDG.rhel7.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: postgresql15-contrib-15.2-1PGDG.rhel7.x86_64
--> Processing Dependency: libxslt.so.1()(64bit) for package: postgresql15-contrib-15.2-1PGDG.rhel7.x86_64
--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: postgresql15-contrib-15.2-1PGDG.rhel7.x86_64
--> Running transaction check
---> Package libxslt.x86_64 0:1.1.28-6.amzn2 will be installed
---> Package postgresql15-contrib.x86_64 0:15.2-1PGDG.rhel7 will be installed
--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: postgresql15-contrib-15.2-1PGDG.rhel7.x86_64
--> Finished Dependency Resolution
Error: Package: postgresql15-contrib-15.2-1PGDG.rhel7.x86_64 (pgdg15)
           Requires: libpython3.6m.so.1.0()(64bit)
           Available: python3-libs-3.6.2-3.amzn2.0.2.x86_64 (amzn2extra-python3)
               libpython3.6m.so.1.0()(64bit)
           Available: python3-libs-3.6.2-3.amzn2.0.3.x86_64 (amzn2extra-python3)
               libpython3.6m.so.1.0()(64bit)
           Installed: python3-libs-3.7.16-1.amzn2.0.2.x86_64 (@amzn2-core)
              ~libpython3.7m.so.1.0()(64bit)
           Available: python3-libs-3.7.0-0.12.b2.amzn2.0.2.x86_64 (amzn2-core)
              ~libpython3.7m.so.1.0()(64bit)
           Available: python3-libs-3.7.0-0.16.b3.amzn2.0.1.x86_64 (amzn2-core)
              ~libpython3.7m.so.1.0()(64bit)
           Available: python3-libs-3.7.0-0.20.rc1.amzn2.0.1.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.0-0.20.rc1.amzn2.0.2.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.1-9.amzn2.0.1.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.2-4.amzn2.0.1.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.3-1.amzn2.0.1.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.3-1.amzn2.0.2.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.4-1.amzn2.0.1.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.4-1.amzn2.0.2.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.4-1.amzn2.0.3.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.4-1.amzn2.0.4.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.6-1.amzn2.0.1.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.8-1.amzn2.0.1.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.9-1.amzn2.0.1.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.9-1.amzn2.0.2.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.9-1.amzn2.0.3.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.10-1.amzn2.0.1.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.15-1.amzn2.0.1.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.15-1.amzn2.0.2.i686 (amzn2-core)
               Not found
           Available: python3-libs-3.7.16-1.amzn2.0.1.i686 (amzn2-core)
               Not found
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[ec2-user@ip-172-31-51-199 ~]$ 

Python is definitely installed on the server and I can verify the version like this:

[ec2-user@ip-172-31-51-199 ~]$ python3 -V
Python 3.7.16
[ec2-user@ip-172-31-51-199 ~]$ 

And here is what I see when looking for the Python shared lib:

[ec2-user@ip-172-31-51-199 ~]$ sudo locate libpython
/home/ec2-user/timp/Python-3.6.12/libpython3.6m.a
/home/ec2-user/timp/Python-3.6.12/Tools/gdb/libpython.py
/usr/lib64/libpython2.7.so
/usr/lib64/libpython2.7.so.1.0
/usr/lib64/libpython3.7m.so.1.0
/usr/lib64/libpython3.8.so.1.0
/usr/lib64/libpython3.so
/usr/lib64/python2.7/config/libpython2.7.so
/usr/local/lib/libpython3.6m.a
/usr/local/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a
/usr/share/systemtap/tapset/libpython2.7-64.stp
[ec2-user@ip-172-31-51-199 ~]$ 

What am I missing? Why won't the postgresql15-contrib install find my python shared lib? Does it have to be python3.6 only? Is 3.7, 3.8 no good?



This is not actually answering your question, but you should know that the PostgreSQL yum repository does not officially support Amazon Linux (as can be seen on the list of available distributions). This sounds like exactly the kind of problem that could show up  on an unsupported distributions.

I'd recommend you try a supported distribution -- if nothing else then just to initially prove that the problem is with Amazon Linux and not something else.


--

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux