我试图在我的Ubuntu Server 12.04安装中安装一些软件,但每当我尝试使用apt-get或aptitude进行安装时,通常会收到如下错误消息:
E: unable to locate package postgresql-plperl-9.0 E: couldn't find any package by regex 'postgresql-plperl-9.0'
我的/etc/apt/sources.list文件的内容是(全部未注释):
deb http://archive.ubuntu.com/ubuntu precise universe multiverse deb-src http://archive.ubuntu.com/ubuntu precise universe multiverse deb http://us.archive.ubuntu.com/ubuntu/ precise universe deb-src http://us.archive.ubuntu.com/ubuntu/ precise universe deb http://us.archive.ubuntu.com/ubuntu/ precise-updates universe deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates universe deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse deb http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse deb http://security.ubuntu.com/ubuntu precise-security universe deb-src http://security.ubuntu.com/ubuntu precise-security universe deb http://security.ubuntu.com/ubuntu precise-security multiverse deb-src http://security.ubuntu.com/ubuntu precise-security multiverse
任何帮助,为什么我遇到这个问题,不胜感激。
如果您确实需要特定的版本,除了Ubuntu回购之外,您还应该使用Postgresql APT回购。
位于http://apt.postgresql.org/pub/repos/apt/
README文件有使用它的说明。
certificate,在新的Ubuntu 14.04系统上使用旧版本:
# grep DESC /etc/lsb-release ; apt-cache show postgresql-plperl-9.0 DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS" Package: postgresql-plperl-9.0 Source: postgresql-9.0 Version: 9.0.18-1.pgdg14.04+1 ...
在普通的ubuntu中没有名为postgresql-plperl-9.0软件包。
另外Ubuntu 12.04只包含postgresql-8.4和postgresql-9.1 。
如果此软件包包含在任何其他软件包源中,则必须包含此信息。
我的build议是运行:
apt-get update
在尝试使用apt-get install来安装软件之前,要确保在机器尝试抓取所有软件包之前,在机器上设置了正确的软件包名称,位置和相关性列表。
看起来很简单,但是对于我来说,过去也是类似的错误。
那么,我做了一个检查,并意识到sources.list文件中的额外的行在列表的末尾缺less“宇宙”行。
所以我把它添加到这样的东西:
deb http://mirrors.kernel.org/ubuntu精确主宇宙和deb-src http://mirrors.kernel.org/ubuntu精确主宇宙
运行apt-get update ,它的工作原理。