gpt4 book ai didi

python - 在 CentOS 7.2 上为 PostgreSQL 9.5 安装 plpython3u

转载 作者:行者123 更新时间:2023-12-03 21:34:07 26 4
gpt4 key购买 nike

尽我所能,我没有成功在 PostgreSQL 9.5 x64 安装上安装 plpython3u 扩展。

从 pgdg 存储库安装的 PostgreSQL 9.5:

[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

并且 python 3.5 安装为:
[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

当我尝试在数据库中启用 plpython3u 时:
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

这有关系吗?
[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

我感谢您的帮助...为此拉头发。

编辑

确定由于某种原因似乎没有安装...!?
[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

并且:
[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

最佳答案

尝试使用 yum

yum install postgresql95-contrib postgresql95-plpython3

关于python - 在 CentOS 7.2 上为 PostgreSQL 9.5 安装 plpython3u,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38417092/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com