0

我有 Debian Wheezy 的 virtualbox。我正在尝试在其上安装 Postgresql 9.2。当我尝试按此指令执行此操作时,我有下一个:

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

4

3 回答 3

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
于 2014-10-22T12:11:14.760 回答
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
于 2013-07-19T17:10:08.030 回答
1

我必须执行以下操作才能在挤压上安装 9.1:

sudo apt-get -t squeeze-backports install libpq5 postgresql-common
sudo apt-get install postgresql-9.1 postgresql-client-9.1

也许在这里需要类似的东西,但对于喘息来说是需要的。我目前没有运行 wheezey,所以我无法测试它。希望这可以帮助。

于 2013-05-19T14:56:40.270 回答