安装ruby 2.4.10时运行'__rvm_make -j8'时出错

5hcedyr0  于 12个月前  发布在  Ruby
关注(0)|答案(1)|浏览(92)

请帮我安装我使用的ruby 2.4.10命令:

rvm install ruby-2.4.10

当我尝试在macOS中安装ruby 2.4.10时,出现以下错误:

Error running '__rvm_make -j8',
please read /usr/local/rvm/log/1692528113_ruby-2.4.10/make.log

There has been an error while running make. Halting the installation.

下面是来自make.log文件的日志

../.././include/ruby/ruby.h:1753:24: note: expanded from macro 'rb_intern'
        __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1743:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    }
    ^
closure.c:136:29: note: ')' token is here
    ret = rb_funcall2(self, rb_intern("call"), argc, RARRAY_CONST_PTR(params));
                            ^~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1753:56: note: expanded from macro 'rb_intern'
        __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
                                                       ^
closure.c:263:14: error: call to undeclared function 'ffi_prep_closure'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    result = ffi_prep_closure(pcl, cif, callback, (void *)self);
             ^
6 warnings and 1 error generated.
make[2]: *** [closure.o] Error 1
make[1]: *** [ext/fiddle/all] Error 2
make: *** [build-ext] Error 2
++ return 2

请帮我安装我使用的ruby 2.4.10命令:rvm install ruby-2.4.10

lh80um4z

lh80um4z1#

仅供将来参考,如果有人遇到类似的问题,只需使用brew卸载openssl@3,然后安装[[email protected]](https://stackoverflow.com/cdn-cgi/l/email-protection)

  1. brew uninstall --ignore-dependencies openssl@3
  2. brew install [[email protected]](https://stackoverflow.com/cdn-cgi/l/email-protection)
  3. rvm reinstall "ruby-2.4.10" --with-openssl-dir=brew --prefix email protected(https://stackoverflow.com/cdn-cgi/l/email-protection) --disable-binary

相关问题