我正在铁轨上学习红宝石,因此需要为app安装一些宝石。 我正在尝试安装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归档镜像有关吗? 由于包裹破损,我甚至无法升级。
答案 0 :(得分:0)
好像你有网络问题
答案 1 :(得分:0)
你没有详细说明你已经做了什么来正确安装Ruby所以我会在Installing Ruby on Ubuntu
上参考这篇博文使用Ubuntu作为开发平台时需要注意的一点是,安装本博客文章中介绍的一些开发工具和库是明智的。
1/31/13 - 如果您有未满足的软件包依赖项,并且您从第三方源安装并获得Package依赖项错误。进入您的软件源并确保未选中Restricted和Universe。
未满足依赖关系的一个可能原因可能是包数据库损坏,和/或某些未正确安装的包。
要尝试解决此问题,请打开终端并运行以下命令
xyz@ubuntuhost$ sudo apt-get clean
apt-get clean清除所有文件/包的本地存储,只留下锁定文件。
如果这不能解决您的问题,请按以下顺序尝试这三个命令。
xyz@ubuntuhost$ sudo apt-get -f install
xyz@ubuntuhost$ sudo dpkg --configure -a
xyz@ubuntuhost$ sudo apt-get -f install
发布最后一个命令的输出。如果找到并修复了某些内容,它会报告类似
的内容1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
或
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded
-f代表“修复破碎”。 Apt将尝试纠正破坏的依赖关系。如果您手动安装了具有未满足依赖关系的软件包,apt-get将尽可能安装这些依赖项,否则它可能只是删除您安装的软件包以解决问题。
给这一点。