使用 rvm 在 Centos 7 上安装 Ruby 时出错

Error installing Ruby on Centos 7 using rvm

我正在使用 rvm 在 Centos 7 上安装 Ruby 2.5.0。

但是我 运行 rvm install ruby-2.5.0 我在编译阶段遇到以下错误:

Error running '__rvm_make -j1',
please read /home/(username)/.rvm/log/1519585487_ruby-2.5.0/make.log
There has been an error while running make. Halting the installation.

/home/(username)/.rvm/log/1519585487_ruby-2.5.0/make.log中我在编译部分发现:

compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
generating miniprelude.c
executable host ruby is required. use --with-baseruby option.
make: *** [miniprelude.c] Error 1
++ return 2

我该如何解决这个问题?

感谢@Keith Bennet 的评论。我找到了解决方案。

解决方案(这非常荒谬)是使用 yum install ruby 安装 ruby 然后再次尝试 运行 rvm use ruby-2.5.0 。像魅力一样工作。