2011-11-29 57 views
3

我試圖在流浪盒中安裝postgresql,但我沒有運氣。我試着與廚師和木偶供應,然後最後只是ssh'd進入框,並試圖apt-get安裝... 結果是一樣的。如何在Vagrant框中安裝Postgresql

通過廚師:

FATAL: Chef::Exceptions::Exec: package[postgresql-client] (postgresql::client line 37) had an error: apt-get -q -y install postgresql-client=8.4.8-0ubuntu0.10.04 returned 100, expected 0 
通過

apt-get的

apt-get install postgresql 
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
The following extra packages will be installed: 
    libpq5 postgresql-8.4 postgresql-client-8.4 postgresql-client-common postgresql-common ssl-cert 
Suggested packages: 
    oidentd ident-server postgresql-doc-8.4 
The following NEW packages will be installed: 
    libpq5 postgresql postgresql-8.4 postgresql-client-8.4 postgresql-client-common postgresql-common 
    ssl-cert 
0 upgraded, 7 newly installed, 0 to remove and 5 not upgraded. 
Need to get 4,899kB/4,952kB of archives. 
After this operation, 20.6MB of additional disk space will be used. 
Do you want to continue [Y/n]? Y 
Err http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main libpq5 8.4.8-0ubuntu0.10.04 
    404 Not Found [IP: 91.189.92.181 80] 
Err http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main postgresql-client-8.4 8.4.8-0ubuntu0.10.04 
    404 Not Found [IP: 91.189.92.181 80] 
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/main ssl-cert 1.0.23ubuntu2 [10.9kB] 
Get:2 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main postgresql-common 106ubuntu1 [88.2kB] 
Err http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main postgresql-8.4 8.4.8-0ubuntu0.10.04 
    404 Not Found [IP: 91.189.92.181 80] 
Err http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main postgresql 8.4.8-0ubuntu0.10.04 
    404 Not Found [IP: 91.189.92.181 80] 
Fetched 99.2kB in 1s (91.7kB/s) 
Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/p/postgresql-8.4/libpq5_8.4.8-0ubuntu0.10.04_i386.deb 404 Not Found [IP: 91.189.92.181 80] 
Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/p/postgresql-8.4/postgresql-client-8.4_8.4.8-0ubuntu0.10.04_i386.deb 404 Not Found [IP: 91.189.92.181 80] 
Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/p/postgresql-8.4/postgresql-8.4_8.4.8-0ubuntu0.10.04_i386.deb 404 Not Found [IP: 91.189.92.181 80] 
Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/p/postgresql-8.4/postgresql_8.4.8-0ubuntu0.10.04_all.deb 404 Not Found [IP: 91.189.92.181 80] 
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? 

任何人遇到此還是我只是一個虛擬的? :)

回答

3

在猜測:您的緩存源索引已過時;運行

apt-get clean; apt-get update 

然後再試一次。另一種可能性是代理服務器(可能是透明的)破壞了請求,甚至是壞鏡子。如果確認代理不是問題,請嘗試在/etc/apt/sources.list中使用不同的鏡像。

這不是一個真正的PostgreSQL問題;建議取消標記。

+0

就是這樣。 :)無標記爲Postgresql –

+0

很高興幫助:-) –

+3

我不同意這個答案 - 或者說,它是不完整的。在運行postgres配方之前,我們應該能夠運行apt-get update作爲Chef配置的一部分。 – ashchristopher