我按照以下步骤在 ubuntu 18.04 上安装 Ruby1.9.1,但安装后显示最新的 ubuntu 版本:
脚步:
sudo apt-get install ruby1.9.1-full
sudo apt-get install rubygems1.9.1
sudo apt-get install ruby1.9.1-dev
sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 1
回复:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ruby1.9.1-full
E: Couldn't find any package by glob 'ruby1.9.1-full'
E: Couldn't find any package by regex 'ruby1.9.1-full'
Ruby apt-get installation failed, make sure that apt is working correctly and try again
./install_opentest.sh: line 135: break: only meaningful in a `for', `while', or `until' loop
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package rubygems1.9.1
E: Couldn't find any package by glob 'rubygems1.9.1'
E: Couldn't find any package by regex 'rubygems1.9.1'
rubygems apt-get installation failed, make sure that apt is working correctly and try again
./install_opentest.sh: line 135: break: only meaningful in a `for', `while', or `until' loop
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ruby1.9.1-dev
E: Couldn't find any package by glob 'ruby1.9.1-dev'
E: Couldn't find any package by regex 'ruby1.9.1-dev'
可以在 Ubuntu 18.04 上安装 ruby1.9.1 吗?
答案1
根据在 http://packages.ubuntu.com 上搜索Ruby 1.9.1 仅适用于 Ubuntu 14.04 LTS。
据官方Ruby 维护分支第 1.9.3 页(以及 2.0.0、2.1、2.2)是停产。
考虑安装受支持的版本Ruby 2.5.1对于你的 Ubuntu 18.04 LTS:
sudo apt install ruby2.5 ruby2.5-dev
如果您确实需要安装 1.9.1 - 那么请手动编译它。但请确保您要使用已过期且不安全的版本。