2013-05-18 53 views
0

我有Debian Wheezy的virtualbox。 我想在它上面安裝Postgresql 9.2。 當我試圖通過this指令做我旁邊:在debian wheezy上安裝postgresql 9.2(在virtualbox上)

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常見:

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

這也許應該去serverfault.SE。唉,遷移路徑已從「關閉」對話框中刪除。 –

回答

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。我現在不運行wheezey,所以我無法測試它。希望這可以幫助。

2

同樣的問題發生在我身上。這是我的解決方案:

添加官方庫

$ echo "deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main" >> /etc/apt/sources.list 

更多的信息在這裏https://wiki.postgresql.org/wiki/Apt

2.更新資質的緩存

$ apt-get update 

你可以看到dif通過運行

$ aptitude versions postgresql-common 

輸出 「PostgreSQL的常見」 的ferent的版本是這樣的:

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 
3

安裝ssl-cert當我添加這些re POS到的sources.list(在/ etc /公寓/):

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