如何在Mac上使用rvm安装ruby而不遇到此错误?

我正在尝试使用rvm安装Ruby,但始终出现错误。

$ rvm install ruby

我希望ruby能够完美安装。相反,我收到以下错误消息:

Warning,new version of rvm available '1.29.9',you are using older version '1.29.9-next'.
You can disable this warning with:   echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with:     echo rvm_autoupdate_flag=2 >> ~/.rvmrc
You can update manually with:        rvm get VERSION                         (e.g. 'rvm get stable')

ruby-2.6.5 - #removing src/ruby-2.6.5..
Searching for binary rubies,this might take some time.
No binary rubies available for: osx/10.14/x86_64/ruby-2.6.5.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
We don't know how to ensure that selected compiler 'x86_64-apple-darwin13.4.0-clang' exists.
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Warning: found user selected compiler 'x86_64-apple-darwin13.4.0-clang',this will suppress RVM auto detection mechanisms.
Installing Ruby from source to: /Users/simonthompson/.rvm/rubies/ruby-2.6.5,this may take a while depending on your cpu(s)...
ruby-2.6.5 - #downloading ruby-2.6.5,this may take a while depending on your connection...
ruby-2.6.5 - #extracting ruby-2.6.5 to /Users/simonthompson/.rvm/src/ruby-2.6..|
ruby-2.6.5 - #configuring..
Error running './configure --prefix=/Users/simonthompson/.rvm/rubies/ruby-2.6.5 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/libksba:/usr/local/opt/readline:/usr/local/opt/zlib:/usr/local/opt/openssl@1.1 --disable-install-doc --enable-shared',please read /Users/simonthompson/.rvm/log/1573168940_ruby-2.6.5/configure.log
There has been an error while running configure. Halting the installation.

当我检查有问题的configure.log文件时,看到以下内容:

[2019-11-08 07:22:55] ./configure
current path: /Users/simonthompson/.rvm/src/ruby-2.6.5
PATH=/usr/local/opt/coreutils/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/simonthompson/.rbenv/shims:/Users/simonthompson/.rbenv/shims:/Users/simonthompson/.rbenv/shims:/Users/simonthompson/.rbenv/shims:/Users/simonthompson/.rbenv/shims:/Users/simonthompson/.rbenv/shims:/Users/simonthompson/.rbenv/shims:/anaconda3/bin:/anaconda3/condabin:/library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/simonthompson/.rvm/bin
command(5): ./configure --prefix=/Users/simonthompson/.rvm/rubies/ruby-2.6.5 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/libksba:/usr/local/opt/readline:/usr/local/opt/zlib:/usr/local/opt/openssl@1.1 --disable-install-doc --enable-shared
checking for ruby... /usr/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... x86_64-apple-darwin18.0.0
checking host system type... x86_64-apple-darwin18.0.0
checking target system type... x86_64-apple-darwin18.0.0
checking whether the C compiler works... no
configure: error: in `/Users/simonthompson/.rvm/src/ruby-2.6.5':
configure: error: C compiler cannot create executables
See `config.log' for more details
lemon2334 回答:如何在Mac上使用rvm安装ruby而不遇到此错误?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3141074.html

大家都在问