因为现在已经过去几个月了,我想我终于可以来这里问问了。我根本无法在 MacOS Ventura 上使用 RVM 安装任何版本的 Ruby。这似乎与其他人遇到的问题无关。我已经尝试了所有其他解决方案。但这似乎与 OpenSSL 或类似的东西无关。
我收到的错误也与这些情况有所不同:
Error running '__rvm_make -j8'
对于初学者...这是我运行时得到的日志的最后几行:rvm install 2.6.10
objspace.c:630:23: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
imemo_type_ids[10] = rb_intern("imemo_parser_strterm");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1826:23: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^
objspace.c:630:23: note: '{' token is here
imemo_type_ids[10] = rb_intern("imemo_parser_strterm");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1826:24: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1811:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
{ \
^
objspace.c:630:23: warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
imemo_type_ids[10] = rb_intern("imemo_parser_strterm");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1826:24: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1816:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
}
^
objspace.c:630:23: note: ')' token is here
imemo_type_ids[10] = rb_intern("imemo_parser_strterm");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1826:56: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^
1342 warnings generated.
linking shared-object objspace.bundle
make: *** [build-ext] Error 2
+__rvm_make:0> return 2
我还安装了最新版本的 macports(并使其路径正常工作),卸载并重新安装 OpenSSL。多次卸载并重新安装 HomeBrew...似乎没有任何帮助。
更新:这是我能找到的一个错误。
error: use of undeclared identifier 'username_completion_function'; did you mean 'rl_username_completion_function'?
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
我搜索了日志,但找不到第二个错误。
很难准确地看出我为解决这个问题做了什么。但我会尽力回溯。
1.卸载自制软件
arch -arm64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
如果您使用的是 M1 芯片,那么您MUST在每个命令之前使用 arch -arm64 否则它将失败。
2.删除所有剩余的自制目录
sudo rm -rf /opt/homebrew
3.重新安装自制程序
arch -arm64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
卸载 Homebrew 并删除其所有目录的原因是,如果您像我一样,您可能在使其正常工作的过程中尝试了数百万种方法。删除 Homebrew 及其相关目录应该会消除您可能犯下的任何错误或绝望的配置赌博。但可以肯定的是...您应该查找隐藏的配置文件以确保它们都没有引用 Ruby。
4.使用rvm安装Ruby
arch -arm64 rvm install 3.2.2
同样,您必须使用“arch -arm64”,否则您的安装将绝对失败。只是这一次错误代码为“1”而不是“2”。
就是这样!安装完成。希望这对某人有帮助。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)