首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在苹果M1 mac上rvm install 2.6.7总是失败

在苹果M1 mac上rvm install 2.6.7总是失败
EN

Stack Overflow用户
提问于 2021-08-24 07:08:13
回答 1查看 1.7K关注 0票数 3

rvm install 2.6.7时,我总是在我的M1 mac上得到下面的错误

代码语言:javascript
运行
复制
me@xx ~ % rvm install 2.6.7
ruby-2.6.7 - #removing src/ruby-2.6.7 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/11.5/x86_64/ruby-2.6.7.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/opt/homebrew/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/me/.rvm/rubies/ruby-2.6.7, this may take a while depending on your cpu(s)...
ruby-2.6.7 - #downloading ruby-2.6.7, this may take a while depending on your connection...
ruby-2.6.7 - #extracting ruby-2.6.7 to /Users/me/.rvm/src/ruby-2.6.7 - please wait
ruby-2.6.7 - #configuring - please wait
ruby-2.6.7 - #post-configuration - please wait
ruby-2.6.7 - #compiling - please wait
Error running '__rvm_make -j8',
please read /Users/me/.rvm/log/1629787822_ruby-2.6.7/make.log

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

回答 1

Stack Overflow用户

发布于 2021-08-24 08:58:23

是的,这是一个上游的已知问题:https://bugs.ruby-lang.org/issues/17777 ruby-build也在跟踪这个问题:https://github.com/rbenv/ruby-build/issues/1489

解决方法是运行以下代码,然后再次安装ruby 2.6.7:

代码语言:javascript
运行
复制
$ export warnflags=-Wno-error=implicit-function-declaration
$ rbenv install 2.6.7

-或者-

代码语言:javascript
运行
复制
$ CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.6.7

看起来这也会影响带有本地扩展的gem安装(mysql2就是其中之一):

代码语言:javascript
运行
复制
gem install <GEMNAME> -- --with-cflags="-Wno-error=implicit-function-declaration"

参考:Error installing ruby 2.6.7 on mac os - how to resolve?

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68903165

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档