加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

无法通过rbenv macOS High Sierra安装ruby 2.5.0

发布时间:2020-12-16 21:36:26 所属栏目:百科 来源:网络整理
导读:我正在使用macOS High Sierra并且一直在尝试通过rbenv安装 ruby 2.5.0但是仍然会出现以下错误 Apple LLVM version 9.0.0 (clang-900.0.39.2)Target: x86_64-apple-darwin17.4.0Thread model: posixInstalledDir: /Applications/Xcode.app/Contents/Developer
我正在使用macOS High Sierra并且一直在尝试通过rbenv安装 ruby 2.5.0但是仍然会出现以下错误
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
compiling miniprelude.c
translating probes probes.d
compiling bignum.c
compiling class.c
error: error reading '/dev/fd/9'
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....e

我在安装rbenv install -v 2.5.0之前尝试了brew doctor和brew升级rbenv ruby??-build

仍然得到同样的错误

有谁知道如何解决这个问题?

解决方法

我在使用ruby-build(由rbenv和其他人使用)安装ruby时遇到了类似的问题,我现在使用以下解决方法来避免它.

这似乎是由于dtrace正在使用macOS 10.3.3进行更新.

首先尝试this,sudo chmod -s /usr/sbin / dtrace

如果在安装ruby时不起作用,那么disable dtrace

RUBY_CONFIGURE_OPTS =“ – disable-dtrace”rbenv install 2.5.0

您还可以将RUBY_CONFIGURE_OPTS =“ – disable-dtrace”导出到.bashrc或.zshrc文件中.

rbenv/ruby-build has notified的维护者这对ruby核心团队很有希望很快得到修复.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读