无法使用rbenv在OSX Ventura 13.0.1上安装ruby版本2.6.6

up9lanfz  于 2023-03-01  发布在  Ruby
关注(0)|答案(1)|浏览(205)

我试着在运行osx13.0.1的mac上安装ruby 2.6.6,我试过rbenv和RVM,我试过卸载和重新安装,总是得到同样的错误。
对于rbenv,这是错误消息-

BUILD FAILED (macOS 13.0.1 using ruby-build 20221225)

Inspect or clean up the working tree at /var/folders/tm/hhn058ks2kl_3rhmf8z4bds80000gn/T/ruby-build.20230111165419.37628.MFqlgm
Results logged to /var/folders/tm/hhn058ks2kl_3rhmf8z4bds80000gn/T/ruby-build.20230111165419.37628.log

Last 10 log lines:
transform_mjit_header: SKIPPED to transform __inline_isinff
transform_mjit_header: SKIPPED to transform __inline_isfinitel
transform_mjit_header: SKIPPED to transform __inline_isfinited
transform_mjit_header: SKIPPED to transform __inline_isfinitef
transform_mjit_header: SKIPPED to transform __darwin_fd_clr
transform_mjit_header: SKIPPED to transform __darwin_fd_set
transform_mjit_header: SKIPPED to transform __darwin_fd_isset
transform_mjit_header: SKIPPED to transform __darwin_check_fd_set
transform_mjit_header: SKIPPED to transform __sputc
ln -sf ../../../.ext/include/x86_64-darwin22/rb_mjit_min_header-2.6.6.h include/ruby-2.6.0/x86_64-darwin22/rb_mjit_min_header-2.6.6.h

使用RVM时,错误消息如下

Error running '__rvm_make -j6',
please read /Users/gid/.rvm/log/1673456334_ruby-2.6.6/make.log

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

The last lines of the log are the same as the rbenv log apart from the final line which is 

+__rvm_make:0> return 2

还有其他人遇到过这个问题吗?任何帮助都非常感谢。

b09cbbtk

b09cbbtk1#

传递**RUBY_CFLAGS ="-w"**对我在MacOS Ventura M2上很有效。
示例:

RUBY_CFLAGS="-w" rbenv install 2.4.0

相关问题