Recently, I've been trying to work on a Rails project on my local workspace. I just swapped laptops (Macbook pro M1), and since then, I have been unable to install Ruby 2.6.6 and/or 2.6.7. Here is the error output when I run rbenv install 2.6.6
:
Last 10 log lines:
compiling ../.././ext/psych/yaml/dumper.c
compiling ../.././ext/psych/yaml/reader.c
compiling ../.././ext/psych/yaml/emitter.c
compiling ../.././ext/psych/yaml/parser.c
linking shared-object date_core.bundle
5 warnings generated.
linking shared-object zlib.bundle
1 warning generated.
linking shared-object psych.bundle
make:***[build-ext] Error 2
I then checked rbenv install --list and it lists 2.5.9, 2.6.7, 2.7.3, and 3.0.1. So, I tried installing 2.6.7, but that did not work either. Apparently, the installation for Ruby 2.6.7 is a known bug and has no fix as of yet ( link1 , link2 ).
If anyone has had experience with this issue, please let me know of some solutions. I have been stuck on this error for the entire day and I am quite desperate :(.
3条答案
按热度按时间jq6vz3qz1#
Ruby 2.6.6不支持带有M1芯片的MacBook。
如果您还想安装,可以试试我已经安装的方式:
如果这不起作用,GitHub issue上还有其他选项。
kg7wmglp2#
如果
rbenv install --list-all
缺少2.6.6
,请在更新ruby-build
时尝试从头重新安装。nbnkbykc3#
前面的答案对我不起作用。但是,这个答案起作用了
RUBY_CFLAGS="-w" rbenv install 2.6.7