PostgreSQL:如何安装plpythonu扩展

编程入门 行业动态 更新时间:2024-10-25 06:23:19
本文介绍了PostgreSQL:如何安装plpythonu扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在Ubuntu 12.04.4上运行PostgreSQL 9.3.1。我想使用plpython语言扩展,但是在尝试使用它时出现错误:

I'm running PostgreSQL 9.3.1 on Ubuntu 12.04.4. I'd like to use the plpython language extension but I get an error when I try to use it:

错误:语言 plpythonu可以不存在

当我尝试创建扩展名时:

When I try to create the extension:

创建扩展plpythonu

...我收到错误: 错误:无法访问文件 $ libdir / plpython2:没有这样的文件或目录

...I get the error: ERROR: could not access file "$libdir/plpython2": No such file or directory

经过大量搜索和挖掘,我尝试安装其他文件软件包,并将所有plpython文件从/usr/share/postgresql/9.1/extension复制到/ opt / bitnami / postgresql / share / extension,而PostgreSQL似乎在寻找它们。至少这使我到达了PostgreSQL看到可用扩展的地方。当我运行时:

After much searching and digging through blog posts I've tried installing additional packages and have copied all the plpython files from /usr/share/postgresql/9.1/extension to /opt/bitnami/postgresql/share/extension where PostgreSQL seems to be looking for them. That at least got me to where PostgreSQL sees the available extensions. When I run:

从pg_available_extensions中选择名称,default_version,installed_version,其中的名称类似于 plpy *

我得到:

名称| default_version |已安装版本 ------------ + ----------------- + -------------- ----- plpython2u | 1.0 | plpython3u | 1.0 | plpythonu | 1.0 |

在/ opt / bitnami / postgresql / lib中仍然看不到plpython库。有人可以帮助我完成其余步骤以使扩展程序正常工作吗?

There are still no plpython libraries that I can see in /opt/bitnami/postgresql/lib. Can anybody help me get through remaining steps to make the extension work? Thanks in advance!

推荐答案

您正在使用Bitnami的PostgreSQL软件包,位于 / opt 。目前尚不清楚是使用 apt-get 还是通过安装程序脚本/程序安装的,但是在这两种情况下,它都不是与Ubuntu postgresql 软件包。

You're using a PostgreSQL package from Bitnami, in /opt. It's not clear if you installed this with apt-get or via an installer script/program, but in either case it's not the same PostgreSQL as what's in the Ubuntu postgresql package.

安装 postgresql-plpython 不会做任何事情很好,因为您要安装的PL / Python支持与实际使用的PostgreSQL安装不同。

Installing postgresql-plpython won't do you any good, because you're installing PL/Python support for a different PostgreSQL install than the one you're actually using.

您将需要使用相同的安装方法您最初用于安装Bitnami PostgreSQL以添加PL / Python支持(如果可用)。

You'll need to use the same installation method you originally used to install the Bitnami PostgreSQL to add PL/Python support, if it's available. It might not be provided by Bitnami.

否则,如果您不太喜欢使用Bitnami的PostgreSQL,则可以使用 apt.postgresql/ 。

Otherwise, if you're not too attached to using Bitnami's PostgreSQL, you could use the recommended packages from apt.postgresql/ .

更多推荐

PostgreSQL:如何安装plpythonu扩展

本文发布于:2023-10-16 00:08:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1495896.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:PostgreSQL   plpythonu

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!