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

时间:2015-12-07 11:39:20

标签: 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.

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

$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)

2 个答案:

答案 0 :(得分:1)

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

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

修复您的包管理器。

答案 1 :(得分:0)

因为,我无法添加评论我将评论添加为答案, 一旦你手动安装相同版本的包,然后你看看是否存在相同的问题实际上我面对不同的包同样的问题,现在它工作正常所以请手动添加它让我知道 感谢