gpt4 book ai didi

ruby - 无法使用 rbenv 安装 Ruby 2.5.1,出现 C 编译器错误

转载 作者:太空宇宙 更新时间:2023-11-03 18:03:52 24 4
gpt4 key购买 nike

我正在尝试设置一台新机器并准备开发环境。我的 Xcode 和命令行工具都安装好了。我使用自制软件来安装 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 doesn't like spaces在主文件夹名称中。它们应该被替换或移除。

关于ruby - 无法使用 rbenv 安装 Ruby 2.5.1,出现 C 编译器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54263779/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com