尝试通过rvm安装ruby时“运行make install时出错”

时间:2017-10-02 07:21:25

标签: ruby-on-rails ruby rvm

我正在使用macOS而我正在尝试通过rvm安装ruby 2.4.1。这是我的控制台的日志

RETINA15M14:folder moi$ rvm install 2.4.1
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.4.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/moi/.rvm/rubies/ruby-2.4.1, this may take a while depending on your cpu(s)...
ruby-2.4.1 - #downloading ruby-2.4.1, this may take a while depending on your connection...
ruby-2.4.1 - #extracting ruby-2.4.1 to /Users/moi/.rvm/src/ruby-2.4.1....
ruby-2.4.1 - #applying patch /Users/moi/.rvm/patches/ruby/2.4.1/random_c_using_NR_prefix.patch.
ruby-2.4.1 - #configuring..................................................................
ruby-2.4.1 - #post-configuration.
ruby-2.4.1 - #compiling...............................................................
ruby-2.4.1 - #installing.....
Error running '__rvm_make install',
please read /Users/moi/.rvm/log/1506928428_ruby-2.4.1/install.log
There has been an error while running make install. Halting the installation.

以下是日志https://pastebin.com/Lh3V0s2P中的内容,我不知道下一步该做什么我尝试了我找到的每一个选项,我找不到任何帮助。请告诉我什么是错的,怎么解决。

1 个答案:

答案 0 :(得分:2)

在安装ruby之前尝试运行以下命令。

xcode-select --install

Refer此处。