4

Try as I might, I have not succeeded in installing the plpython3u extension on a PostgreSQL 9.5 x64 install.

PostgreSQL 9.5 installed from pgdg repo:

[joe@postgresql ~]$ yum list installed | grep pgdg
CGAL.x86_64                          4.7-1.rhel7                 @pgdg95
SFCGAL.x86_64                        1.2.2-1.rhel7               @pgdg95
SFCGAL-libs.x86_64                   1.2.2-1.rhel7               @pgdg95
geos.x86_64                          3.5.0-1.rhel7               @pgdg95
pgdg-centos95.noarch                 9.5-2                       installed
plv8_95.x86_64                       1.4.4-1.rhel7               @pgdg95
postgis2_95.x86_64                   2.2.2-1.rhel7               @pgdg95
postgis2_95-client.x86_64            2.2.2-1.rhel7               @pgdg95
postgresql95.x86_64                  9.5.3-2PGDG.rhel7           @pgdg95
postgresql95-contrib.x86_64          9.5.3-2PGDG.rhel7           @pgdg95
postgresql95-devel.x86_64            9.5.3-2PGDG.rhel7           @pgdg95
postgresql95-libs.x86_64             9.5.3-2PGDG.rhel7           @pgdg95
postgresql95-plpython.x86_64         9.5.3-2PGDG.rhel7           @pgdg95
postgresql95-server.x86_64           9.5.3-2PGDG.rhel7           @pgdg95

And python 3.5 installed as:

[joe@postgresql ~]$ yum list installed | grep python35
python35u.x86_64                     3.5.2-1.ius.centos7            @ius
python35u-devel.x86_64               3.5.2-1.ius.centos7            @ius
python35u-libs.x86_64                3.5.2-1.ius.centos7            @ius
python35u-pip.noarch                 8.1.2-1.ius.centos7            @ius
python35u-setuptools.noarch          22.0.5-1.ius.centos7           @ius

When I try to enable plpython3u in a database:

psql (9.5.3)
Type "help" for help.

postgres=# create extension plpython3u;
ERROR:  could not open extension control file "/usr/pgsql-9.5/share/extension/plpython3u.control": No such file or directory
postgres=# \q

Does this have something to do with it?

[joe@postgresql ~]$ which python
/usr/bin/python
[joe@postgresql ~]$ ls /usr/bin/pyt* -l
lrwxrwxrwx. 1 root root     7 Jul 15 23:05 /usr/bin/python -> python2
lrwxrwxrwx. 1 root root     9 Jul 15 23:05 /usr/bin/python2 -> python2.7
-rwxr-xr-x. 1 root root  7136 Nov 19  2015 /usr/bin/python2.7
-rwxr-xr-x. 2 root root 11304 Jun 27 12:05 /usr/bin/python3.5
lrwxrwxrwx. 1 root root    26 Jul 16 18:14 /usr/bin/python3.5-config -> /usr/bin/python3.5m-config
-rwxr-xr-x. 2 root root 11304 Jun 27 12:05 /usr/bin/python3.5m
-rwxr-xr-x. 1 root root   173 Jun 27 12:04 /usr/bin/python3.5m-config
-rwxr-xr-x. 1 root root  3398 Jun 27 12:02 /usr/bin/python3.5m-x86_64-config

My thanks for the help... pulling hair out on this.

EDIT

Sure doesn't appear to be installed for some reason...!?

[joe@postgresql ~]$  ls -l /usr/pgsql-9.5/lib/plp*
-rwxr-xr-x. 1 root root 174352 May 14 15:49 /usr/pgsql-9.5/lib/plpgsql.so
-rwxr-xr-x. 1 root root 123632 May 14 15:49 /usr/pgsql-9.5/lib/plpython2.so

And also:

[joe@postgresql ~]$ ls -l /usr/pgsql-9.5/share/extension/plp*
-rw-r--r--. 1 root root 332 May 14 15:44 /usr/pgsql-9.5/share/extension/plpgsql--1.0.sql
-rw-r--r--. 1 root root 179 May 14 15:44 /usr/pgsql-9.5/share/extension/plpgsql.control
-rw-r--r--. 1 root root 381 May 14 15:44 /usr/pgsql-9.5/share/extension/plpgsql--unpackaged--1.0.sql
-rw-r--r--. 1 root root 351 May 14 15:45 /usr/pgsql-9.5/share/extension/plpython2u--1.0.sql
-rw-r--r--. 1 root root 196 May 14 15:45 /usr/pgsql-9.5/share/extension/plpython2u.control
-rw-r--r--. 1 root root 402 May 14 15:45 /usr/pgsql-9.5/share/extension/plpython2u--unpackaged--1.0.sql
-rw-r--r--. 1 root root 347 May 14 15:45 /usr/pgsql-9.5/share/extension/plpythonu--1.0.sql
-rw-r--r--. 1 root root 194 May 14 15:45 /usr/pgsql-9.5/share/extension/plpythonu.control
-rw-r--r--. 1 root root 393 May 14 15:45 /usr/pgsql-9.5/share/extension/plpythonu--unpackaged--1.0.sql
Joebocop
  • 539
  • 3
  • 9
  • 17
  • 3
    Using aptitude: `sudo apt-get install postgresql-plpython3-9.5`. It seems that yum uses the different naming conventions. – Abelisto Jul 17 '16 at 02:52
  • The postgresql95-plpython.x86_64 I installed from the PGDG repo isn't sufficient? – Joebocop Jul 17 '16 at 04:11
  • 1
    No. postgresql95-plpython.x86_64 is for plpythonu & plpython2u but not for plpython3u. That's why you get the message "could not open extension control file...". Those files are shipped with appropriate packages (if it does not include into the standard installation). Look at the [PostGIS installation](http://postgis.net/install/) for Red Hat / Centos / Scientific Linux for example. – Abelisto Jul 17 '16 at 06:36
  • @Abelisto - i have when sudo apt list --installed | grep postgres postgresql/bionic,bionic,now 10+190 all [installed] postgresql-10/bionic-updates,bionic-security,now 10.6-0ubuntu0.18.04.1 amd64 [installed,automatic] postgresql-client-10/bionic-updates,bionic-security,now 10.6-0ubuntu0.18.04.1 amd64 [installed,automatic] postgresql-client-common/bionic,bionic,now 190 all [installed] postgresql-common/bionic,bionic,now 190 all [installed,automatic] postgresql-contrib/bionic,bionic,now 10+190 all [installed] – WebComer Nov 21 '18 at 11:31
  • @Abelisto postgresql-plpython-10/bionic-updates,bionic-security,now 10.6-0ubuntu0.18.04.1 amd64 [installed] postgresql-plpython3-10/bionic-updates,bionic-security,now 10.6-0ubuntu0.18.04.1 amd64 [installed] and still ERROR: could not open extension control file "/usr/share/postgresql/10/extension/plpython3u.control": No such file or director – WebComer Nov 21 '18 at 11:31

1 Answers1

0

Try using yum

yum install postgresql95-contrib postgresql95-plpython3
DARK_C0D3R
  • 2,075
  • 16
  • 21