我在尝试使用RVM更新Ruby版本时遇到了困难。我已经遵循了推荐的步骤,包括更新RVM本身,安装最新的稳定Ruby版本,并将其设置为默认版本。然而,尽管做了这些努力,我环境中的Ruby版本似乎没有成功更新。当我运行ruby --version这样的命令时,它仍然显示旧版本。我也尝试清理RVM,重新启动我的shell,并仔细检查我的PATH,但问题仍然存在。任何关于如何使用RVM故障排除和成功更新我的Ruby版本的指导或见解将不胜感激。
当我运行rvm安装3.0.0为twiple这就是我得到的
Error running '__rvm_make -j8', please read /Users/apple/.rvm/log/1703760048_ruby-3.0.0/make.log
There has been an error while running make. Halting the installation.```
字符串
当我去检查制作日志时,我得到的是:
../.././include/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
}
^
ancdata.c:1440:36: note: ')' token is here
ary = rb_attr_get(ctl, rb_intern("unix_rights"));
^~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1847:56: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....`your text`
linking shared-object json/ext/parser.bundle
raddrinfo.c:2687:18: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
id_timeout = rb_intern("timeout");
^~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1847:23: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^
raddrinfo.c:2687:18: note: '{' token is here
id_timeout = rb_intern("timeout");
^~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
{ \
^
raddrinfo.c:2687:18: warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
id_timeout = rb_intern("timeout");
^~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
}
^
raddrinfo.c:2687:18: note: ')' token is here
id_timeout = rb_intern("timeout");
^~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1847:56: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^
18 warnings generated.
30 warnings generated.
2 warnings generated.
linking shared-object socket.bundle
12 warnings generated.
linking shared-object ripper.bundle
make: *** [build-ext] Error 2
+__rvm_make:0> return 2
型
当我尝试rbenv时,我得到了这个
BUILD FAILED (macOS 13.6.1 on x86_64 using ruby-build 20231225)
型
我遵循了更新过程中推荐的步骤。这包括使用rvm get stable更新RVM本身,使用rvm install ruby --latest安装最新的稳定Ruby版本,并使用rvm use ruby --default将新安装的版本设置为默认版本。
1条答案
按热度按时间holgip5t1#
由于你的makefile有错误
make[1]: *** [ext/openssl/all] Error 2
,我将尝试一下,并说你需要链接适当的Openssl二进制文件。所以在你的终端中发出命令:字符串
如果你得到这样的结果:
型
然后你需要告诉
make
你的openssl二进制文件在哪里。使用从which
命令返回的路径试试这个:型
替换你的openssl路径。