Ошибка установки Heroku Toolbelt: не удалось найти пакет heroku-toolbelt

Я сталкиваюсь с ошибкой при установке Heroku Toolbelt. Моя ОС убунту-12.04. Я обнаружил аналогичную проблему в stackoverflow: не удалось установить heroku на Ubuntu 12.04 LTS. Его отчет об ошибке похож на мой, и мы оба из Китая. Из этого поста он сказал, что причина и решение: «Сайт toolbelt.heroku.com заблокирован в Китае, вы должны использовать решение для проблем с GFW, чтобы получить к нему такой доступ». Но я не уверен, что у нас такая же проблема.

Может кто подскажет что не так с установкой и как это исправить? Спасибо! Моя ОС Ubuntu 12.04. Ниже моя информация об установке:

administrator@ubuntu:~/mysite$ wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | LC_ALL=C sh
This script requires superuser access to install apt packages.
You will be prompted for your password by sudo.
[sudo] password for administrator: 
--2013-10-17 10:56:27--  https://toolbelt.heroku.com/apt/release.key
Resolving toolbelt.heroku.com (toolbelt.heroku.com)... 54.243.76.97, 174.129.17.173, 23.21.198.2
Connecting to toolbelt.heroku.com (toolbelt.heroku.com)|54.243.76.97|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1737 (1.7K) [application/octet-stream]
Saving to: `STDOUT'

100%[======================================>] 1,737       --.-K/s   in 0s      

2013-10-17 10:56:29 (8.89 MB/s) - written to stdout [1737/1737]

OK
Hit http://cn.archive.ubuntu.com precise Release.gpg
Hit http://cn.archive.ubuntu.com precise-updates Release.gpg                   
Hit http://cn.archive.ubuntu.com precise-backports Release.gpg                 
Hit http://cn.archive.ubuntu.com precise Release                               
Hit http://cn.archive.ubuntu.com precise-updates Release                       
Hit http://cn.archive.ubuntu.com precise-backports Release                     
Hit http://cn.archive.ubuntu.com precise/main Sources                          
Hit http://ppa.launchpad.net precise Release.gpg                               
Hit http://cn.archive.ubuntu.com precise/restricted Sources                    
Hit http://cn.archive.ubuntu.com precise/universe Sources                      
Hit http://cn.archive.ubuntu.com precise/multiverse Sources                    
Hit http://cn.archive.ubuntu.com precise/main i386 Packages                    
Hit http://cn.archive.ubuntu.com precise/restricted i386 Packages              
Hit http://cn.archive.ubuntu.com precise/universe i386 Packages                
Hit http://cn.archive.ubuntu.com precise/multiverse i386 Packages              
Hit http://cn.archive.ubuntu.com precise/main TranslationIndex                 
Hit http://cn.archive.ubuntu.com precise/multiverse TranslationIndex           
Hit http://cn.archive.ubuntu.com precise/restricted TranslationIndex           
Hit http://security.ubuntu.com precise-security Release.gpg                    
Hit http://cn.archive.ubuntu.com precise/universe TranslationIndex             
Hit http://cn.archive.ubuntu.com precise-updates/main Sources                  
Hit http://cn.archive.ubuntu.com precise-updates/restricted Sources            
Hit http://cn.archive.ubuntu.com precise-updates/universe Sources              
Hit http://cn.archive.ubuntu.com precise-updates/multiverse Sources            
Hit http://cn.archive.ubuntu.com precise-updates/main i386 Packages            
Hit http://cn.archive.ubuntu.com precise-updates/restricted i386 Packages      
Hit http://cn.archive.ubuntu.com precise-updates/universe i386 Packages        
Hit http://ppa.launchpad.net precise Release                                   
Hit http://cn.archive.ubuntu.com precise-updates/multiverse i386 Packages      
Hit http://cn.archive.ubuntu.com precise-updates/main TranslationIndex         
Hit http://cn.archive.ubuntu.com precise-updates/multiverse TranslationIndex   
Hit http://cn.archive.ubuntu.com precise-updates/restricted TranslationIndex   
Hit http://cn.archive.ubuntu.com precise-updates/universe TranslationIndex     
Hit http://cn.archive.ubuntu.com precise-backports/main Sources                
Hit http://cn.archive.ubuntu.com precise-backports/restricted Sources          
Hit http://cn.archive.ubuntu.com precise-backports/universe Sources            
Hit http://cn.archive.ubuntu.com precise-backports/multiverse Sources          
Hit http://cn.archive.ubuntu.com precise-backports/main i386 Packages          
Hit http://cn.archive.ubuntu.com precise-backports/restricted i386 Packages    
Hit http://cn.archive.ubuntu.com precise-backports/universe i386 Packages      
Hit http://cn.archive.ubuntu.com precise-backports/multiverse i386 Packages    
Hit http://cn.archive.ubuntu.com precise-backports/main TranslationIndex       
Hit http://cn.archive.ubuntu.com precise-backports/multiverse TranslationIndex 
Hit http://cn.archive.ubuntu.com precise-backports/restricted TranslationIndex 
Hit http://cn.archive.ubuntu.com precise-backports/universe TranslationIndex   
Hit http://security.ubuntu.com precise-security Release                        
Hit http://cn.archive.ubuntu.com precise/main Translation-en                   
Hit http://cn.archive.ubuntu.com precise/multiverse Translation-en             
Hit http://cn.archive.ubuntu.com precise/restricted Translation-en             
Hit http://cn.archive.ubuntu.com precise/universe Translation-en               
Hit http://cn.archive.ubuntu.com precise-updates/main Translation-en           
Hit http://ppa.launchpad.net precise/main Sources                              
Hit http://cn.archive.ubuntu.com precise-updates/multiverse Translation-en     
Hit http://cn.archive.ubuntu.com precise-updates/restricted Translation-en     
Hit http://cn.archive.ubuntu.com precise-updates/universe Translation-en       
Hit http://cn.archive.ubuntu.com precise-backports/main Translation-en         
Hit http://cn.archive.ubuntu.com precise-backports/multiverse Translation-en   
Hit http://cn.archive.ubuntu.com precise-backports/restricted Translation-en   
Hit http://cn.archive.ubuntu.com precise-backports/universe Translation-en     
Hit http://ppa.launchpad.net precise/main i386 Packages                        
Ign http://ppa.launchpad.net precise/main TranslationIndex                     
Hit http://security.ubuntu.com precise-security/main Sources                   
Err http://toolbelt.heroku.com ./ Release.gpg                                  
  Connection failed [IP: 174.129.17.173 80]
Hit http://security.ubuntu.com precise-security/restricted Sources             
Hit http://security.ubuntu.com precise-security/universe Sources               
Hit http://security.ubuntu.com precise-security/multiverse Sources             
Hit http://security.ubuntu.com precise-security/main i386 Packages             
Hit http://security.ubuntu.com precise-security/restricted i386 Packages       
Hit http://security.ubuntu.com precise-security/universe i386 Packages         
Hit http://security.ubuntu.com precise-security/multiverse i386 Packages       
Hit http://security.ubuntu.com precise-security/main TranslationIndex          
Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex    
Hit http://security.ubuntu.com precise-security/restricted TranslationIndex    
Hit http://security.ubuntu.com precise-security/universe TranslationIndex      
Hit http://security.ubuntu.com precise-security/main Translation-en            
Hit http://security.ubuntu.com precise-security/multiverse Translation-en      
Ign http://ppa.launchpad.net precise/main Translation-en                       
Hit http://security.ubuntu.com precise-security/restricted Translation-en      
Ign http://toolbelt.heroku.com ./ Release                                      
Hit http://security.ubuntu.com precise-security/universe Translation-en        
Err http://toolbelt.heroku.com ./ Packages                          
  Connection failed [IP: 23.21.198.2 80]
Err http://toolbelt.heroku.com ./ Translation-en
  Connection failed [IP: 54.243.76.97 80]
W: Failed to fetch http://toolbelt.heroku.com/ubuntu/./Release.gpg  Connection failed [IP: 174.129.17.173 80]

W: Failed to fetch http://toolbelt.heroku.com/ubuntu/./Packages  Connection failed [IP: 23.21.198.2 80]

W: Failed to fetch http://toolbelt.heroku.com/ubuntu/./en  Connection failed [IP: 54.243.76.97 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package heroku-toolbelt

person Yang Wenhao    schedule 17.10.2013    source источник


Ответы (2)


Да, это полностью проблема GFW. Теперь исправляю. Если у вас есть какие-то проблемы со мной, вы можете попробовать мой подход. На самом деле взломать великий брандмауэр не так уж и сложно. Процесс занял у меня чуть больше 1 часа.

Короче говоря, мой подход заключается в установке goagent и последующем добавлении конфигурации. Деталь:

1, установка goagent: https://code.google.com/p/goagent/wiki/InstallGuide

2, добавляю конфиг:

sudo su # you need root privilege first
echo "Acquire::http::Proxy \"http://127.0.0.1:8087\";" >> /etc/apt/apt.conf.d/40proxy

Примечание: после шага 1 вы можете взломать великий брандмауэр (GFW), а после шага 2 вы, наконец, сможете решить проблему установки набора инструментов heroku, с которой я столкнулся.

Спасибо всем, кто вносит свой вклад в решение проблемы!

Ресурс:

http://my.oschina.net/swuly302/blog/155971

https://code.google.com/p/goagent/wiki/InstallGuide

person Yang Wenhao    schedule 18.10.2013

Простой способ решить эту проблему:

# Use the "https" instead of "http" for the heroku's sources.list
echo "deb https://toolbelt.heroku.com/ubuntu ./" > /etc/apt/sources.list.d/heroku.list

#Install apt-transport-https in order to support https
sudo apt-get install apt-transport-https
person floating cat    schedule 23.02.2014