ruby - 如何在 ubuntu 19.04 上安装 rvm install 2.1.1

标签 ruby rvm

在 ubuntu 19.04 上安装 ruby​​ 版本 2.1.1 时出现错误 -

rvm install ruby-2.1.1
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/19.04/x86_64/ruby-2.1.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Removing undesired packages: libssl-dev....
Installing requirements for ubuntu.
Updating system....
Installing required packages: libssl1.0-dev....
Error running 'requirements_debian_libs_install libssl1.0-dev',
please read /home/user/.rvm/log/1560773845_ruby-2.1.1/package_install_libssl1.0-dev.log
Requirements installation failed with status: 100.

最佳答案

您可以按照此 RVM github 问题上发布的说明安装以前版本的 Ruby:https://github.com/rvm/rvm/issues/4680#issuecomment-515951866

I did the same as @grhansen suggested. I was installing ruby 2.3 and that required libssl1.0-dev. I am using Ubuntu 19.04. So I opened my /etc/apt/sources.list by

sudo nano/etc/apt/sources.list

And then add the following line at the end of the file

deb http://security.ubuntu.com/ubuntu bionic-security main

After that I run the command

sudo apt 更新

from the terminal. Then I run the command

apt-cache policy libssl1.0-dev

from the terminal and I got the following output

libssl1.0-dev:已安装:(无)候选人: 1.0.2n-1ubuntu5.3 版本表:1.0.2n-1ubuntu5.3 500 500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 包

Then I run the command

sudo apt-get install libssl1.0-dev

And it is installed then

Before adding I was getting

libssl1.0-dev:已安装:(无) 候选:(无)版本表:

关于ruby - 如何在 ubuntu 19.04 上安装 rvm install 2.1.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56631331/

相关文章:

ruby - 无法运行 Jekyll 新命令

ruby - Ruby 版本管理器 (rvm) 的替代品有哪些?

ruby - 更改 Rubinius Ruby 版本

mysql - 将 Ruby 版本与 MySql 客户端混合使用时出现问题

ruby - 如何过滤掉 CDATA 并仅从 HTML 中获取文本?

ruby-on-rails - 来自 pluck 的漂亮数组

Ruby on rails跨平台win/linux脚本

ruby-on-rails - RVM 不使用 cron 设置环境

ruby - 将 'gem list' 用于带有 RVM 的 git gems 时, 'bundle install' 未找到 gems

ruby-on-rails - Heroku Rails Force SSL 重定向循环