运行“__rvm_make install”时出错在 macOS 蒙特利上
我正在尝试使用 rvm 在 mac(12.2.1) 上安装 ruby 2.7.0 版本,但出现以下错误,并尝试了 github 上所有可能的解决方案,似乎没有任何效果。甚至尝试使用 rbenv 但同样的错误。请帮忙,先谢谢你了。
rashmi.b@xxxx Documents % rvm install 2.7.0
ruby-2.7.0 - #removing src/ruby-2.7.0 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/12.2/x86_64/ruby-2.7.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/[email protected]/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/rashmi.b/.rvm/rubies/ruby-2.7.0, this may take a while depending on your cpu(s)...
ruby-2.7.0 - #downloading ruby-2.7.0, this may take a while depending on your connection...
ruby-2.7.0 - #extracting ruby-2.7.0 to /Users/rashmi.b/.rvm/src/ruby-2.7.0 - please wait
ruby-2.7.0 - #configuring - please wait
ruby-2.7.0 - #post-configuration - please wait
ruby-2.7.0 - #compiling - please wait
ruby-2.7.0 - #installing - please wait
Error running '__rvm_make install',
please read /Users/rashmi.b/.rvm/log/1647236002_ruby-2.7.0/install.log
There has been an error while running make install. Halting the installation.
/Users/rashmi.b/.rvm/log/1647236002_ruby-2.7.0/install.log =>
generating x86_64-darwin21-fake.rb
x86_64-darwin21-fake.rb updated
BASERUBY = /usr/bin/ruby --disable=gems
CC = gcc
LD = ld
LDSHARED = gcc -dynamiclib
CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -std=gnu99 -fno-common -pipe
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -DCANONICALIZATION_FOR_MATHN -I. -I.ext/include/x86_64-darwin21 -I./include -I. -I./enc/unicode/12.1.0
CPPFLAGS = -I/usr/local/opt/libyaml/include -I/usr/local/opt/libksba/include -I/usr/local/opt/readline/include -I/usr/local/opt/zlib/include -I/usr/local/opt/[email protected]/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/[email protected]/lib -install_name /Users/rashmi.b/.rvm/rubies/ruby-2.7.0/lib/libruby.2.7.dylib -compatibility_version 2.7 -current_version 2.7.0 -fstack-protector-strong -framework Security -framework Foundation -fstack-protector-strong -framework Security -framework Foundation
SOLIBS = -lpthread -lgmp -ldl -lobjc
LANG =
LC_ALL =
LC_CTYPE = UTF-8
MFLAGS =
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
generating enc.mk
making srcs under enc
make[1]: Nothing to be done for `srcs'.
generating transdb.h
transdb.h unchanged
generating makefiles ext/configure-ext.mk
ext/configure-ext.mk updated
generating makefile exts.mk
exts.mk unchanged
./revision.h unchanged
make[1]: Nothing to be done for `note'.
making enc
make[1]: Nothing to be done for `enc'.
making trans
make[1]: Nothing to be done for `./enc/trans'.
making encs
make[1]: Nothing to be done for `encs'.
./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -r./x86_64-darwin21-fake ./tool/rbinstall.rb --make="/Library/Developer/CommandLineTools/usr/bin/make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc" --exclude=doc
make: *** [do-install-nodoc] Killed: 9
+__rvm_make:0> return 2
Openssl 版本 - 3.0.1 14
I am trying to install ruby 2.7.0 version on mac(12.2.1) using rvm but getting below error, and tried all the solution possible on github nothing seems to work. Even tried using rbenv but same error. Please help, thank you in advance.
rashmi.b@xxxx Documents % rvm install 2.7.0
ruby-2.7.0 - #removing src/ruby-2.7.0 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/12.2/x86_64/ruby-2.7.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/[email protected]/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/rashmi.b/.rvm/rubies/ruby-2.7.0, this may take a while depending on your cpu(s)...
ruby-2.7.0 - #downloading ruby-2.7.0, this may take a while depending on your connection...
ruby-2.7.0 - #extracting ruby-2.7.0 to /Users/rashmi.b/.rvm/src/ruby-2.7.0 - please wait
ruby-2.7.0 - #configuring - please wait
ruby-2.7.0 - #post-configuration - please wait
ruby-2.7.0 - #compiling - please wait
ruby-2.7.0 - #installing - please wait
Error running '__rvm_make install',
please read /Users/rashmi.b/.rvm/log/1647236002_ruby-2.7.0/install.log
There has been an error while running make install. Halting the installation.
/Users/rashmi.b/.rvm/log/1647236002_ruby-2.7.0/install.log =>
generating x86_64-darwin21-fake.rb
x86_64-darwin21-fake.rb updated
BASERUBY = /usr/bin/ruby --disable=gems
CC = gcc
LD = ld
LDSHARED = gcc -dynamiclib
CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -std=gnu99 -fno-common -pipe
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -DCANONICALIZATION_FOR_MATHN -I. -I.ext/include/x86_64-darwin21 -I./include -I. -I./enc/unicode/12.1.0
CPPFLAGS = -I/usr/local/opt/libyaml/include -I/usr/local/opt/libksba/include -I/usr/local/opt/readline/include -I/usr/local/opt/zlib/include -I/usr/local/opt/[email protected]/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/[email protected]/lib -install_name /Users/rashmi.b/.rvm/rubies/ruby-2.7.0/lib/libruby.2.7.dylib -compatibility_version 2.7 -current_version 2.7.0 -fstack-protector-strong -framework Security -framework Foundation -fstack-protector-strong -framework Security -framework Foundation
SOLIBS = -lpthread -lgmp -ldl -lobjc
LANG =
LC_ALL =
LC_CTYPE = UTF-8
MFLAGS =
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
generating enc.mk
making srcs under enc
make[1]: Nothing to be done for `srcs'.
generating transdb.h
transdb.h unchanged
generating makefiles ext/configure-ext.mk
ext/configure-ext.mk updated
generating makefile exts.mk
exts.mk unchanged
./revision.h unchanged
make[1]: Nothing to be done for `note'.
making enc
make[1]: Nothing to be done for `enc'.
making trans
make[1]: Nothing to be done for `./enc/trans'.
making encs
make[1]: Nothing to be done for `encs'.
./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -r./x86_64-darwin21-fake ./tool/rbinstall.rb --make="/Library/Developer/CommandLineTools/usr/bin/make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc" --exclude=doc
make: *** [do-install-nodoc] Killed: 9
+__rvm_make:0> return 2
Openssl version - 3.0.1 14
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
为了安装它,我必须运行:
rvm get master
rvm install
然后:
rvm use
捆绑安装
To get it installing, I had to run:
rvm get master
rvm install <the version>
Then:
rvm use <the version>
bundle install
如果有人在 OSX Montrerey 和安装 Ruby 2.7.0 时遇到问题,请使用以下命令,而不是浪费这么多尝试:
brew install ruby-build
brew install rbenv
CFLAGS ="-Wno-error=隐式函数声明" rbenv install 2.7.0
rbenv 全局 2.7.0
rbenv 本地--unset
rbenv init -
echo 'eval "$(rbenv init -)"' >>> ~/.bash_profile
解决方案后半部分的来源在这里选择您刚刚安装的操作系统版本
https://stackoverflow.com/a/39238995/3086197
将 2.7.0 替换为您需要的版本
If any one face problem with OSX Montrerey and installing Ruby 2.7.0 use the following instead of wasting so much trying:
brew install ruby-build
brew install rbenv
CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.7.0
rbenv global 2.7.0
rbenv local --unset
rbenv init -
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source of second half of solution is here to select the version you just installed by the OS
https://stackoverflow.com/a/39238995/3086197
replace 2.7.0 with the version you need
似乎有什么东西强行终止了你的编译过程。不幸的是,目前尚不清楚那是什么外部进程,但它可能是 Mac 上的某些病毒扫描程序或其他安全软件。
无论如何,请注意,目前还没有发布的 Ruby 支持 OpenSSL 3.0。同时您必须使用 OpenSSL 1.1.1。
It seems that something forcefully killed your compilation process. Unfortunately, it's not clear what external process that was, but it might be some virus scanner or other security software on your mac.
In any case, please be aware that no released Ruby supports OpenSSL 3.0 yet. You have to use OpenSSL 1.1.1 in the meantime.
我遇到了同样的问题,并通过运行
rvm install 2.7.3 -j 1
运行“__rvm_make -j16”时出错
I had the same issue and fixed it by running
rvm install 2.7.3 -j 1
Error running '__rvm_make -j16'
我尝试安装 ruby 3.2.1。
出现这样的错误:
运行'__rvm_make -j10'时出错
有助于切换到较低的线程数。
创建文件
~/.rvmrc
添加这个:
I tried to install ruby 3.2.1.
There was such error:
Error running '__rvm_make -j10'
Helped to swap to a lower thread count.
Create file
~/.rvmrc
Add this:
如果您要在 m1 macbook 上安装 2.7.1 或更早版本的 ruby,请使用以下命令:
If you're installing 2.7.1 or older version of ruby on m1 macbook use this command: