Re: postgresql14-contrib does not install with libpython 3.7

Поиск
Список
Период
Сортировка
От Alex Williams
Тема Re: postgresql14-contrib does not install with libpython 3.7
Дата
Msg-id 8RU9quPN6AQrN2IFe-aFPObA5gaIalKaZeHC4hZYzN_NtzZRyjDlTdgLFTk8iINHcgk021QYYfiCeGXTFyELYJvduBx7DMC1s7aB8qOjH7c=@protonmail.com
обсуждение исходный текст
Ответ на Re: postgresql14-contrib does not install with libpython 3.7  (Alex Williams <valenceshell@protonmail.com>)
Ответы Re: postgresql14-contrib does not install with libpython 3.7  (Marcia Rocha <mar.rocha@gmail.com>)
Список pgsql-admin
Hi Marcia,

Thanks again, worked perfectly!

In my case, I'm using 14.8, so I used that version and compiled against python 3.7 with no issues. The last part was manual as I copied the generated pg contrib files from [/usr/pgcontrib_py/pgsql-14/ ] to those same folders in [/usr/pgsql-14/] as those folders existed already and had files in them, only one folder had the same two files***, so I excluded them from overwriting since they were the same size.

Thanks again, really appreciated!

Alex

​***[root]# cp /usr/pgcontrib_py/pgsql-14/lib/* /usr/pgsql-14/lib
  • cp: overwrite ‘/usr/pgsql-14/lib/dict_int.so’? n
    cp: overwrite ‘/usr/pgsql-14/lib/dict_xsyn.so’? n


Sent with Proton Mail secure email.

------- Original Message -------
On Thursday, October 19th, 2023 at 6:43 PM, Alex Williams <valenceshell@protonmail.com> wrote:

Hi Marcia,

Thank you so much! I'll try that and will let you know how it goes. 

Thanks again, I really appreciate it.

Alex

Sent with Proton Mail secure email.

------- Original Message -------
On Thursday, October 19th, 2023 at 6:38 PM, Marcia Rocha <mar.rocha@gmail.com> wrote:

Hi, Alex
This is what I did using Daniel suggestions:
[root]# yum groupinstall "Development tools"
[root]# useradd postgres
[root]# yum install readline-devel
[root]# yum install zlib-devel
[postgres]$ wget https://ftp.postgresql.org/pub/source/v14.2/postgresql-14.2.tar.bz2
[postgres]$ tar -xvf postgresql-14.2.tar.bz2
[root]# mkdir /usr/pgcontrib_py/pgsql-14
[root]# cd postgresql-14.2/
[root]# PYTHON=/bin/python3
[root]# ./configure --prefix=/usr/pgcontrib_py/pgsql-14 --with-python
[root]# cd contrib
[root]# gmake clean
[root]# gmake
[root]# gmake install

After this, the content at /usr/pgcontrib_py/pgsql-14 could be compressed and could be uncompressed under a PG 14 installation at /usr/pgsql-14/

Best regards
Marcia



On Thu, Oct 19, 2023 at 7:35 PM Alex Williams <valenceshell@protonmail.com> wrote:
Hi Tom/Maria,

I'm in a similar situation using a Amazon Linux 2 server instance and by default it comes with Python 3.7. I uninstalled Python 3.7 and installed Python 3.6 and the postgres contrib-14 package installed without issue.

Of course, there was a recent security patch where we now need to remove Python 3.6 and use Python 3.7 to apply the vulnerability update.

Trying it again, with Python 3.7, I get:
Error: Package: postgresql14-contrib-14.9-2PGDG.rhel7.x86_64 (pgdg14)
Requires: libpython3.6m.so.1.0()(64bit)
Available: python3-libs-3.6.2-3.amzn2.0.2.x86_64 (amzn2extra-python3)

Can you please let me know what you did to get it work with Python 3.7. I assumed there was a source postgres-contrib14 location I could wget and build against Python 3.7 but I can't find it, so I assume someone is manually adding various extensions to this and creating packages, but offering no source to build with?

Thanks in advance for your help,

Alex



> Yeah ... I don't have a RHEL7 installation handy, but the official Python
> installation in my RHEL8 workstation is 3.6.8, so it's impossible to
> believe that RHEL7 shipped with Python 3.7. What you have there is a
> nonstandard software environment, and if you want to stick with it that's
> going to mean doing some of your own building.
>
> However, rather than compiling directly from source as Daniel suggests,
> I'd suggest grabbing the SRPM for the package version you want and
> building RPMs from that locally. This is, generally, even easier than
> building raw source, and it will make for a much easier transition from
> your existing RPM-based installation of PG.
>
> regards, tom lane


В списке pgsql-admin по дате отправления:

Предыдущее
От: Ron
Дата:
Сообщение: Re: pg_restore is not working
Следующее
От: M Sarwar
Дата:
Сообщение: Re: pg_restore is not working