请帮我安装我使用的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
1条答案
按热度按时间lh80um4z1#
仅供将来参考,如果有人遇到类似的问题,只需使用brew卸载
openssl@3
,然后安装[[email protected]](https://stackoverflow.com/cdn-cgi/l/email-protection)
。brew uninstall --ignore-dependencies openssl@3
brew install [[email protected]](https://stackoverflow.com/cdn-cgi/l/email-protection)
rvm reinstall "ruby-2.4.10" --with-openssl-dir=
brew --prefix email protected(https://stackoverflow.com/cdn-cgi/l/email-protection)--disable-binary