我无法安装我想要的红宝石版本

时间:2018-09-14 06:12:11

标签: ruby-on-rails ruby terminal

我正在尝试按照此网站上的说明进行操作。 https://github.com/lewagon/setup/blob/master/macOS.md

我完成了该课程,并且在MacBook Pro上运行良好,但是在Mac上却无法运行。当我尝试将rbenv install 2.4.4放入终端时,我一直得到这个消息:

➜  ~ rbenv install 2.4.4

ruby-build: use openssl from homebrew
Downloading ruby-2.4.4.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.4.tar.bz2
Installing ruby-2.4.4...
ruby-build: use readline from homebrew

BUILD FAILED (OS X 10.13.6 using ruby-build 20180822)

Inspect or clean up the working tree at /var/folders/xp/klxg47b13z37040q9qskx_q80000gp/T/ruby-build.20180914070221.21380
Results logged to /var/folders/xp/klxg47b13z37040q9qskx_q80000gp/T/ruby-build.20180914070221.21380.log

Last 10 log lines:
translating probes probes.d
compiling main.c
compiling dmydln.c
compiling miniinit.c
error: error reading '/dev/fd/8'
1 error generated.
clang: error: unable to remove file: Operation not permitted
dtrace: failed to compile script probes.d: Preprocessor failed to process input program
make: *** [probes.h] Error 1
make: *** Waiting for unfinished jobs....

您能给我的任何帮助将不胜感激。我正在考虑仅擦拭mac并将其恢复为出厂设置,然后重试。

2 个答案:

答案 0 :(得分:1)

如评论中所建议,您可能需要注意防病毒 尽管您使用的是rbenv,但我发现了有关rvm的类似问题。用户也收到与您相同的例外。也许它可以帮助您了解如何解决该问题:https://github.com/rvm/rvm/issues/4313

该问题的报告者错误与您类似:

error: error reading '/dev/fd/4'
1 error generated.
clang: error: unable to remove file: Operation not permitted
dtrace: failed to compile script probes.d: Preprocessor failed to process input program
make: *** [probes.h] Error 1

答案 1 :(得分:0)

几个小时后,同样的问题,我在这里找到了解决方法:

https://github.com/rvm/rvm/issues/4313

请尝试在安装过程中禁用防病毒软件的实时保护。 为我工作。

我希望对您有帮助