Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用RVM安装ruby时的编译器问题:检查C编译器是否工作。。。不_Ruby_Macos_Clang_Rvm - Fatal编程技术网

使用RVM安装ruby时的编译器问题:检查C编译器是否工作。。。不

使用RVM安装ruby时的编译器问题:检查C编译器是否工作。。。不,ruby,macos,clang,rvm,Ruby,Macos,Clang,Rvm,我正在尝试用RVM安装ruby,比如RVM安装2.4.1 在搬到莫哈韦之前,我从来没有遇到过这样的问题,在这里我真的很不适应 但我得到一个错误,似乎与叮当声有关 ruby-2.4.1 - #removing src/ruby-2.4.1.. Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.14/x86_64/ruby-2.4.1. Continuing w

我正在尝试用RVM安装ruby,比如
RVM安装2.4.1

在搬到莫哈韦之前,我从来没有遇到过这样的问题,在这里我真的很不适应

但我得到一个错误,似乎与叮当声有关

ruby-2.4.1 - #removing src/ruby-2.4.1..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.14/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.
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/me/.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/me/.rvm/src/ruby-2.4.1.....
ruby-2.4.1 - #applying patch /Users/me/.rvm/patches/ruby/2.4.1/random_c_using_NR_prefix.patch.
ruby-2.4.1 - #configuring..
Error running './configure --prefix=/Users/me/.rvm/rubies/ruby-2.4.1 --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/me/.rvm/log/1575328022_ruby-2.4.1/configure.log
There has been an error while running configure. Halting the installation.
/Users/me/.rvm/log/1575328022_ruby-2.4.1/configure.log
上的日志为:

[2019-12-02 18:07:54] ./configure
current path: /Users/me/.rvm/src/ruby-2.4.1
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:/usr/local/anaconda3/bin:/usr/local/anaconda3/condabin:/usr/local/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/me/.rvm/bin
command(5): ./configure --prefix=/Users/me/.rvm/rubies/ruby-2.4.1 --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
config.guess already exists
config.sub already exists
checking build system type... x86_64-apple-darwin18.5.0
checking host system type... x86_64-apple-darwin18.5.0
checking target system type... x86_64-apple-darwin18.5.0
checking whether the C compiler works... no
configure: error: in `/Users/me/.rvm/src/ruby-2.4.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
我花了好几个小时在这件事上,一点运气都没有

有人能推荐一些试试吗

更新:
虽然这看起来类似于,但推荐的解决方案是参考xcode 4.3。我现在使用的是xcode 11.2,它不再包含“首选项”中的“下载”选项卡。

可能重复:与Rails或Linux无关,因此不确定为什么要标记它们。您是否尝试过
xcode select--install