【问题标题】:Error running '__rvm_make -j 1'运行“__rvm_make -j 1”时出错
【发布时间】:2018-02-25 12:11:01
【问题描述】:

今天我试图安装 ruby​​ 2.5.0,但我每次都收到这个错误。

控制台输出我遇到的错误

rvm install ruby-2.5.0
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.13/x86_64/ruby-2.5.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/andreiaalmeida/.rvm/rubies/ruby-2.5.0, this may take a while depending on your cpu(s)...
ruby-2.5.0 - #downloading ruby-2.5.0, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13.3M  100 13.3M    0     0   429k      0  0:00:31  0:00:31 --:--:--  490k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.5.0 - #extracting ruby-2.5.0 to /Users/andreiaalmeida/.rvm/src/ruby-2.5.0....
ruby-2.5.0 - #configuring......................................................|
ruby-2.5.0 - #post-configuration.
ruby-2.5.0 - #compiling...

Error running '__rvm_make -j 1',
please read /Users/andreiaalmeida/.rvm/log/1519558776_ruby-2.5.0/make.log
There has been an error while running make. Halting the installation.

我的 make.log 文件

[2018-02-25 11:40:33] __rvm_make
__rvm_make () 
{ 
    \make "$@" || return $?
}
current path: /Users/andreiaalmeida/.rvm/src/ruby-2.5.0
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:/Users/andreiaalmeida/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/opt/X11/bin:/Users/andreiaalmeida/.rvm/bin
command(3): __rvm_make -j 1
++ make -j 1
    CC = gcc
    LD = ld
    LDSHARED = gcc -dynamiclib
    CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens   -fno-common -pipe 
    XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT
    CPPFLAGS = -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl@1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -I. -I.ext/include/x86_64-darwin17 -I./include -I. -I./enc/unicode/10.0.0
    DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl@1.1/lib -install_name /Users/andreiaalmeida/.rvm/rubies/ruby-2.5.0/lib/libruby.2.5.dylib -compatibility_version 2.5 -current_version 2.5.0  -fstack-protector -framework Foundation  -fstack-protector -framework Foundation  
    SOLIBS = -lpthread -lgmp -ldl -lobjc 
    LANG = 
    LC_ALL = 
    LC_CTYPE = UTF-8
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
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
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
++ return 2

我尝试完全卸载 rvm (rvm implode) 并重新安装,但没有成功。

系统

  • Mac OS X – High Sierra (10.13.3)
  • rvm 1.29.3(最新)
  • 自制 1.5.4

【问题讨论】:

  • 我也有这个确切的问题。你找到解决办法了吗?

标签: ruby rvm homebrew


【解决方案1】:

试试rvm install 2.5.0 --disable-dtrace

原因在这里,https://github.com/rbenv/ruby-build/issues/1061

可能的 Ruby 构建问题

【讨论】:

  • 虽然此代码可能会回答问题,但提供有关 如何 和/或 为什么 它解决问题的额外上下文将改善答案的长期性价值。
  • 在此之前我必须运行“rvm get stable --auto-dotfiles”,因为我遇到了路径错误。感谢您的回答,这解决了我的问题。
【解决方案2】:

我遇到了与原始海报相同的问题。

编译将在

处停止
ruby-2.2.6 - #compiling...                                                                                                                   
Error running '__rvm_make -j 1',                                           
please read /Users/alexharvey/.rvm/log/1525652818_ruby-2.2.6/make.log
There has been an error while running make. Halting the installation.

检查 make.log 显示:

translating probes probes.d
error: error reading '/dev/fd/4'
1 error generated.
clang: error: unable to remove file: Operation not permitted

我终于在this 链接中找到了对 Avira Anti-virus 的引用。

我去了 Avira Anti-virus 并选择了“禁用实时保护”并再次尝试。这样就解决了。

【讨论】:

    【解决方案3】:

    ruby-2.4.6 - #compile - 请稍候 运行“__rvm_make -j4”时出错, 请阅读/Users/mgq/.rvm/log/1557891511_ruby-2.4.6/make.log

    运行 make 时出错。停止安装。

    Avira 防病毒软件似乎正在运行。据报道,它会导致 ruby​​ 编译失败。 在安装期间禁用它,然后重试。

    make.log

    • __rvm_make:0> 制作 -j4
    • '****************'
    • 错误:读取“/dev/fd/7”时出错
    • 生成了 1 个错误。
    • clang:错误:无法删除文件:不允许操作

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-03-06
      • 1970-01-01
      • 1970-01-01
      • 2021-06-28
      • 2022-11-17
      • 2022-08-16
      • 2019-12-03
      • 2022-12-30
      相关资源
      最近更新 更多