我尝试在我的 ubuntu 10.04 服务器版本上安装 ruby
sudo apt-get install ruby
我收到以下错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
ruby: Depends: ruby1.8 but it is not going to be installed
E: Broken packages
答案1
我认为您的问题是由于您的包管理器拥有过时的信息造成的。即它知道ruby
包依赖于ruby1.8
包,但当它尝试安装后者时,却无法在存储库中找到它。
这是因为自 Lucid Lynx 发布以来,Lucid Lyx 中的 Ruby 已更新至 1.9.1 版本:http://packages.ubuntu.com/lucid/ruby/
因此您需要更新包管理器使用的信息:
sudo apt-get update
然后你可以安装 ruby:
sudo apt-get install ruby
您将获得 1.9.1 版本
(此外,请考虑使用安全更新和错误修复sudo apt-get upgrade
- 目前您的系统可能缺少 2 年的安全更新)