无法安装 ruby 运行'__rvm_make -j4'时出错,

问题描述 投票:0回答:2

描述

无法在 Ubuntu 15~22.04.1 上安装 Ruby 3.0.2

重现步骤

  1. 运行rvm install“3.0.2”

预期行为

Ruby 已安装

实际行为

运行“__rvm_make -j4”时出错,

image

调试模式make.log

环境信息

image

 rvm info

`系统:

系统: uname:“Linux cas12-GemiBook-Pro 6.5.0-15-generic #15~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC 1月12日星期五18:54:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux” 名称:“乌班图” 版本:“22.04” 架构:“x86_64” bash: “/usr/bin/bash => GNU bash,版本 5.1.16(1)-release (x86_64-pc-linux-gnu)” zsh: “/usr/bin/zsh => zsh 5.8.1 (x86_64-ubuntu-linux-gnu)” 远程路径:“ubuntu/22.04/x86_64”

rvm: 版本:“1.29.12(手册)” 更新:“51 分钟 1 秒前” 路径:“/usr/share/rvm” autolibs:“[4] 允许 RVM 使用包管理器(如果找到)、安装缺少的依赖项、安装包管理器(仅限 OS X)。”

家园: 宝石:“未设置” 红宝石:“未设置”

二进制文件: 红宝石:“/ usr / bin / ruby” irb:“/usr/bin/irb” 宝石:“/usr/bin/gem” 耙子:“/usr/bin/rake”

环境: 路径:“/home/cas12/istio-1.20.1/bin/:/root/go/src/k8s.io/kubernetes/third_party/etcd:/usr/local/sbin:/usr/local/bin:/usr /sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/root/bin:/usr/local/go/bin:/root/kubectl-插件:/home/cas12/istio-1.20.1/bin:/root/.antigen/bundles/robbyrussell/oh-my-zsh/lib:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins /命令未找到:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/docker:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/docker-compose:/根/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/fancy-ctrl-z:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git-extras:/root/.antigen /bundles/robbyrussell/oh-my-zsh/plugins/gnu-utils:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/yarn:/root/.antigen/bundles/robbyrussell/oh-my -zsh/plugins/git:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/gh:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/terraform:/root/ .antigen/bundles/robbyrussell/oh-my-zsh/plugins/aws:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/history:/root/.antigen/bundles/robbyrussell/oh-my -zsh/plugins/oc:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/npm:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/node:/root/ .antigen/bundles/robbyrussell/oh-my-zsh/plugins/mvn:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/golang:/root/.antigen/bundles/robbyrussell/oh-my -zsh/plugins/kubectl:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/pip:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/systemd:/root/ .antigen/bundles/robbyrussell/oh-my-zsh/plugins/python:/root/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/tmux:/root/.antigen/bundles/zsh-users/zsh -自动建议:/root/.antigen/bundles/popstas/zsh-command-time:/root/.antigen/bundles/urbainvaes/fzf-marks:/root/.antigen/bundles/ytet5uy4/fzf-widgets:/root/ .antigen/bundles/zdharma-continuum/fast-syntax-highlighting:/usr/share/rvm/bin" GEM_HOME:“” 宝石路径:“” MY_RUBY_HOME:“” IRBRC:“” 鲁比奥特:“” 宝石镶嵌:“” `

ruby-on-rails ruby rvm
2个回答
2
投票

正如您在

make.log
中看到的,这些错误都与 openssl 链接有关。这可能是因为您的系统上安装了 openssl >= 3.0 - ruby 3.0 不支持。您需要安装 openssl-1.1.1,或使用 ruby >= 3.1


0
投票

我无法安装ruby 3.0.0,但已解决。面临以下问题:

> rvm install "ruby-3.0.0"
ruby-3.0.0 - #removing src/ruby-3.0.0 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/22.04/x86_64/ruby-3.0.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /usr/share/rvm/rubies/ruby-3.0.0, this may take a while depending on your cpu(s)...
ruby-3.0.0 - #downloading ruby-3.0.0, this may take a while depending on your connection...
ruby-3.0.0 - #extracting ruby-3.0.0 to /usr/share/rvm/src/ruby-3.0.0 - please wait
ruby-3.0.0 - #configuring - please wait
ruby-3.0.0 - #post-configuration - please wait
ruby-3.0.0 - #compiling - please wait
Error running '__rvm_make -j24',
please read /usr/share/rvm/log/1715040786_ruby-3.0.0/make.log

There has been an error while running make. Halting the installation.

解决方案: 以下步骤解决了我的问题。

  1. 降级 libssl-dev 和 openssl 软件包。

    sudo apt install libssl-dev=1.1.1l-1ubuntu1.4  openssl=1.1.1l-1ubuntu1.4 

  2. 现在安装红宝石。

    rvm install "ruby-3.0.0"

  3. 验证您指定的 ruby 版本安装。

> rvm list
=> ruby-3.0.0 [ x86_64 ]
 * ruby-3.1.1 [ x86_64 ]
   ruby-3.3.1 [ x86_64 ]
  1. 恢复软件包降级并返回到之前的状态。
    sudo apt install libssl-dev openssl
© www.soinside.com 2019 - 2024. All rights reserved.