2012-11-15 91 views
4

我試圖在通過代理連接到互聯網的Ubuntu機器上安裝Heroku Toolbelt。我對Ubuntu和它的設置很新,但我設法連接到互聯網上。互聯網似乎正在工作正常瀏覽和通過apt-get獲得更新總是成功的,curl命令返回所期望的。通過代理在Ubuntu上安裝Heroku Toolbelt

當我嘗試運行在Heroku的列工具網站上的命令:

wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh 

我得到一些錯誤:

[email protected]:~/Documents/stuff$ wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh 
This script requires superuser access to install apt packages. 
You will be prompted for your password by sudo. 
[sudo] password for hsiehbe: 
--2012-11-15 15:09:46-- https://toolbelt.heroku.com/apt/release.key 
Resolving toolbelt.heroku.com... failed: Name or service not known. 
wget: unable to resolve host address `toolbelt.heroku.com' 
gpg: no valid OpenPGP data found. 
Ign http://us.archive.ubuntu.com oneiric InRelease 
Ign http://security.ubuntu.com oneiric-security InRelease   
Ign http://extras.ubuntu.com oneiric InRelease      
... 
Fetched 12.9 MB in 32s (394 kB/s)                      
Reading package lists... Done 
W: GPG error: http://toolbelt.heroku.com ./ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C927EBE00F1B0520 
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
The following extra packages will be installed: 
    foreman heroku libreadline5 libruby1.9.1 ruby1.9.1 
Suggested packages: 
    ruby1.9.1-examples ri1.9.1 graphviz ruby1.9.1-dev 
The following NEW packages will be installed: 
    foreman heroku heroku-toolbelt libreadline5 libruby1.9.1 ruby1.9.1 
0 upgraded, 6 newly installed, 0 to remove and 27 not upgraded. 
Need to get 4,815 kB of archives. 
After this operation, 15.9 MB of additional disk space will be used. 
WARNING: The following packages cannot be authenticated! 
    foreman heroku heroku-toolbelt 
E: There are problems and -y was used without --force-yes 

最明顯的錯誤可能只是

Resolving toolbelt.heroku.com... failed: Name or service not know. 

我錯過了什麼?

回答

8

安裝時,我剛剛有同樣的問題Heroku的工具區後面代理:

問題的核心是:

GPG error: http://toolbelt.heroku.com ./ Release: The following 
signatures couldn't be verified because the public key is not 
available: NO_PUBKEY C927EBE00F1B0520 

你會發現,那下次你運行時易於得到更新你將獲得相同的信息。看來ubuntu不能獲得heroku軟件包倉庫的公鑰。

爲了克服這一點,你可以在此描述手動附加公鑰: http://en.kioskea.net/faq/809-debian-apt-get-no-pubkey-gpg-error

gpg --keyserver pgpkeys.mit.edu --recv-key C927EBE00F1B0520 
gpg -a --export C927EBE00F1B0520 | sudo apt-key add - 

在此之後,安裝腳本將運行正常。

+0

請注意,第二個代碼塊實際上是兩個單獨的命令,並且您需要將「C927EBE00F1B0520」替換爲您實際獲得的錯誤 – electrichead

+1

我無法在pgpkeys.mit.edu處獲得heroku密鑰,導致運行'gpg'命令時,「找不到有效的OpenPGP數據」錯誤信息。我從heroku'wget https:// toolbelt.heroku.com/apt/release.key'獲得密鑰,然後'sudo apt-key add release.key'添加密鑰。然後安裝腳本運行良好。 –

+0

我不能得到這個工作太... @McOda –