perl - 在 Ubuntu 中的 postgres-9.4 上安装 perl 扩展时出错

标签 perl postgresql ubuntu

我已经在 Ubuntu 15.10 上安装了 postgresql 9.4。关于安装 postgresql-plperl-9.4 通过 apt 显示错误。

sudo apt-get install -f postgresql-plperl-9.4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql-plperl-9.4 : Depends: libperl5.14 (>= 5.14.2) but it is not installable
E: Unable to correct problems, you have held broken packages.

我已经安装了 libperl-dev 和 libperl 5.20.2 版本,但它没有解决问题。

$dpkg -l | grep libperl
ii  libperl-dev                                   5.20.2-6                                   amd64        Perl library: development files
ii  libperl5.20                                   5.20.2-6                                   amd64        shared Perl library
ii  libperlio-gzip-perl                           0.18-3build1                               amd64        module providing a PerlIO layer to gzip/gunzip

还安装了相同版本的perl

$perl -v

This is perl 5, version 20, subversion 2 (v5.20.2) built for x86_64-linux-gnu-thread-multi
(with 51 registered patches, see perl -V for more detail)

最佳答案

PL/Perl 将 Perl 解释器嵌入到 PostgreSQL 服务器中。您尝试安装的 PL/Perl 包期望系统 Perl 为 Perl 5.14,但它是 Perl 5.20。无法安装。

我怀疑您的存储库列表被搞乱了,因为 postgresql-plperl-9.4 package Ubuntu 15.10 正确链接到 Perl 5.20,而不是 Perl 5.14。

修复你的包管理器。

关于perl - 在 Ubuntu 中的 postgres-9.4 上安装 perl 扩展时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34132689/

相关文章:

java - 当 super 用户时 System.getenv() 返回 null

regex - 尝试在Mac上的bash中将连字符后的单词的第一个字母大写

regex - perl 正则表达式从字符串 : why does it work? 中删除初始全空白行

sql - 用编程语言循环sql查询可以吗

sql - 带有正则表达式的自定义 postgreSQL 域以接受一组特定的字符串

mongodb - 使用 Ansible 安装特定于版本的 MongoDB

mysql - 如何连接到digitalocean mysql服务器

performance - WWW::Mechanize 使用 SSL 可以工作,但响应速度很慢

jquery - 在perl cgi脚本中迭代动态数组

postgresql 如何在带句号和不带句号的搜索词的字段内搜索