繁体   English   中英

无法使用rbenv安装Ruby 2.5.1,导致C Compiler错误

[英]Unable to install Ruby 2.5.1 using rbenv, gives C Compiler error

我正在尝试设置一台新机器并准备开发环境。 我的Xcode和命令行工具都已安装完毕。 我用homebrew来安装ruby-build和rbenv。 然后我执行命令:

rbenv install 2.5.1

但是我收到以下错误:

BUILD FAILED (OS X 10.14.2 using ruby-build 20181225)
Inspect or clean up the working tree at /var/folders/
kk/d2c_1jqj2dd88mcscwsrcz_w0000gp/T/ruby-build.201901
18184337.15691
Results logged to /var/folders/kk/d2c_1jqj2dd88mcscws
rcz_w0000gp/T/ruby-build.20190118184337.15691.log

Last 10 log lines:
checking build system type... x86_64-apple-darwin18.2.0
checking host system type... x86_64-apple-darwin18.2.0
checking target system type... x86_64-apple-darwin18.2.0
checking whether the C compiler works… no
configure: error: in
`/var/folders/kk/d2c_1jqj2dd88mcscwsrcz_w0000gp/T/ruby
build.20190118184337.15691/ruby-2.5.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
./configure: line 346: sort: No such file or directory
./configure: line 343: sed: No such file or directory
make: *** No targets specified and no makefile found.
  Stop.

我已经尝试进入日志,看看我是否能看到那里的东西,但什么都没有。

我试图寻找解决方案,但无济于事。

如果有人可以帮我指出正确的方向并帮助我解决这个问题,我将非常感激。

谢谢!

您的主文件夹的名称是什么? rbenv 不喜欢主文件夹名称中的空格 应该更换或删除它们。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM