11.04 / 11.10没有ruby替代品?

运行update-alternatives --config ruby失败:

 # uname -a Linux test06 2.6.38-8-virtual #42-Ubuntu SMP Mon Apr 11 04:06:34 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux # cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=11.04 DISTRIB_CODENAME=natty DISTRIB_DESCRIPTION="Ubuntu 11.04" # apt-get install ruby1.9.1-full Reading package lists... Done Building dependency tree Reading state information... Done ruby1.9.1-full is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded. # update-alternatives --config ruby update-alternatives: error: no alternatives for ruby. # ls -l /etc/alternatives/ru* ls: cannot access /etc/alternatives/ru*: No such file or directory 

2天前(2012年1月15日)我写了一个Puppet清单,它使用update-alternatives来设置正确的Ruby版本。 今天,更新替代方案如上所述失败。 Ruby替代品去了哪里?

那么你需要安装超过1个版本的ruby才有可能替代“ruby”(通常是/ usr / bin / ruby​​)

如果你只安装了ruby1.9.1,(ruby1.9.X),则没有alt。 可得到

防爆。 在11.10, – 对于某些媒体应用程序,我需要安装1.9.2和1.8,所以更新替代品反映了&允许我根据需要切换

 $ sudo update-alternatives --config ruby [sudo] password for doug: There are 2 choices for the alternative ruby (providing /usr/bin/ruby). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/bin/ruby1.8 50 auto mode 1 /usr/bin/ruby1.8 50 manual mode * 2 /usr/bin/ruby1.9.1 10 manual mode Press enter to keep the current choice[*], or type selection number: 

默认情况下,在11.04 / 11.10中,软件包“ruby”提供了ruby1.8