我正在学习 ruby on rails,因此需要为 app 安装一些 gem。我正在尝试安装 ruby-bundler 但出现错误。需要一些帮助..我将在终端中粘贴我尝试过的命令。提前致谢。
hp@ubuntu:~$ bundle install --without production
The program 'bundle' is currently not installed. You can install it by typing:
sudo apt-get install ruby-bundler
hp@ubuntu:~$ sudo apt-get install ruby-bundler
[sudo] password for hp:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
ruby ruby1.8
Suggested packages:
ri ruby-dev ruby1.8-examples ri1.8
The following NEW packages will be installed:
ruby ruby-bundler ruby1.8
0 upgraded, 3 newly installed, 0 to remove and 64 not upgraded.
Need to get 143 kB of archives.
After this operation, 1,139 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://ubuntuarchive.hnsdc.com/ubuntu/ oneiric/main ruby all 4.8
Unable to connect to ubuntuarchive.hnsdc.com:http:
Err http://ubuntuarchive.hnsdc.com/ubuntu/ oneiric/universe ruby-bundler all 1.0.15- 0ubuntu2
Unable to connect to ubuntuarchive.hnsdc.com:http:
Err http://ubuntuarchive.hnsdc.com/ubuntu/ oneiric-security/main ruby1.8 i386 1.8.7.352- 2ubuntu0.1
Unable to connect to ubuntuarchive.hnsdc.com:http:
Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/pool/main/r/ruby1.8/ruby1.8_1.8.7.352-2ubuntu0.1_i386.deb Unable to connect to ubuntuarchive.hnsdc.com:http:
Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/pool/main/r/ruby- defaults/ruby_4.8_all.deb Unable to connect to ubuntuarchive.hnsdc.com:http:
Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/pool/universe/r/ruby-bundler/ruby-bundler_1.0.15-0ubuntu2_all.deb Unable to connect to ubuntuarchive.hnsdc.com:http:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
hp@ubuntu:~$ sudo apt-get update
Ign http://archive.canonical.com oneiric InRelease
Hit http://archive.canonical.com oneiric Release.gpg
Hit http://archive.canonical.com oneiric Release
Hit http://archive.canonical.com oneiric/partner i386 Packages
Ign http://archive.canonical.com oneiric/partner TranslationIndex
Err http://ubuntuarchive.hnsdc.com oneiric InRelease
Err http://ubuntuarchive.hnsdc.com oneiric-updates InRelease
Err http://ubuntuarchive.hnsdc.com oneiric-security InRelease
Err http://ubuntuarchive.hnsdc.com oneiric Release.gpg
Unable to connect to ubuntuarchive.hnsdc.com:http:
Err http://ubuntuarchive.hnsdc.com oneiric-updates Release.gpg
Unable to connect to ubuntuarchive.hnsdc.com:http:
Err http://ubuntuarchive.hnsdc.com oneiric-security Release.gpg
Unable to connect to ubuntuarchive.hnsdc.com:http:
Ign http://archive.canonical.com oneiric/partner Translation-en_US
Ign http://archive.canonical.com oneiric/partner Translation-en
Reading package lists... Done
W: Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/dists/oneiric/InRelease
W: Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/dists/oneiric-updates/InRelease
W: Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/dists/oneiric-security/InRelease
W: Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/dists/oneiric/Release.gpg Unable to connect to ubuntuarchive.hnsdc.com:http:
W: Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/dists/oneiric-updates/Release.gpg Unable to connect to ubuntuarchive.hnsdc.com:http:
W: Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/dists/oneiric-security/Release.gpg Unable to connect to ubuntuarchive.hnsdc.com:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.
可能是什么原因?它与ubuntu存档镜像有关吗?由于软件包损坏,我什至无法升级。