我有Debian Wheezy的virtualbox。 我正在尝试安装Postgresql 9.2。 当我尝试通过this指令时,我有下一个:
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-9.2 : Depends: postgresql-common (>= 135~) but it is not going to be installed
Depends: ssl-cert but it is not installable
E: Unable to correct problems, you have held broken packages.
当我尝试安装postgresql-common时:
apt-get install postgresql-common
我接下来:
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-common : Depends: ssl-cert (>= 1.0.11) but it is not installable
E: Unable to correct problems, you have held broken packages
当我尝试安装ssl-cert:
时apt-get install ssl-cert
我接下来:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ssl-cert is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ssl-cert' has no installation candidate
我是Linux的新手,请帮我安装Postgresql 9.2
答案 0 :(得分:3)
当我将这些repos添加到sources.list(/ etc / apt /)时,安装ssl-cert有效:
deb http://ftp.de.debian.org/debian/ wheezy main non-free contrib
deb-src http://ftp.de.debian.org/debian/ wheezy main non-free contrib
然后:
apt-get update
aptitude install ssl-cert
aptitude install postgresql-common
aptitude install postgresql-9.2
答案 1 :(得分:2)
同样的问题发生在我身上。这是我的解决方案:
1. 添加官方存储库
$ echo "deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main" >> /etc/apt/sources.list
此处有更多信息https://wiki.postgresql.org/wiki/Apt
2. 更新aptitude的缓存
$ apt-get update
3. 您可以通过
查看“postgresql-common”的不同版本$ aptitude versions postgresql-common
输出是这样的:
Package postgresql-common:
p 134wheezy3 stable
p 147.pgdg70+1 wheezy-pgdg
所以我们必须选择一个正确的来源
4. 安装包
$ aptitude install postgresql-common postgresql-9.2 libpq-dev -t wheezy-pgdg
答案 2 :(得分:1)
我必须执行以下操作才能在squeeze上安装9.1:
sudo apt-get -t squeeze-backports install libpq5 postgresql-common
sudo apt-get install postgresql-9.1 postgresql-client-9.1
也许类似的东西,但这里需要wheezey。我目前没有运行wheezey所以我无法测试它。希望这会有所帮助。