Postgresql

在 debian wheezy 上安裝 postgresql 9.2(在 virtualbox 上)

  • May 18, 2013

我有 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

有我的sources.list

#

# deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official i386 CD Binary-1 201305$

deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official i386 CD Binary-1 20130504$

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

# wheezy-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
# deb http://ftp.debian.org/debian/ wheezy-updates main
# deb-src http://ftp.debian.org/debian/ wheezy-updates main

將此添加到您的sources.list

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

確保使用適合您所在位置的鏡子。

執行aptitude updateapt-get update並完成安裝。

的互動模式aptitude對於解決依賴關係非常有用。

引用自:https://unix.stackexchange.com/questions/76305