mac 安装 ruby 失败。运行“__rvm_make -j4”时出错

问题描述 投票:0回答:3

当我在终端中执行“rvm install 2.7.2”时,运行“__rvm_make -j4”时出现错误,如果有人可以提供帮助,我将不胜感激

ruby macos cocoapods rvm
3个回答
1
投票

使用 macOS BigSur 也有同样的问题,这对我有用:

CFLAGS="-Wno-error=implicit-function-declaration" rvm install x.x.x

1
投票

这对我有帮助:https://github.com/rvm/rvm/issues/5043#issuecomment-967000943

复制以下内容:

  1. 右键单击“应用程序/实用程序”文件夹中的“终端”,获取信息,勾选“使用 Rosetta 打开”框。

  2. 卸载自制软件

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
rm -rf /opt/homebrew/*
sudo rm -rf /opt/homebrew
  1. 重新安装自制程序
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. 重新启动终端

  2. 检查 Homebrew 是否工作正常:

    brew doctor

  3. 重新安装openssl:

    brew install openssl

  4. 安装 Ruby:

    rvm install 2.7
    或任何版本


0
投票

这些步骤对我有用

$ which openssl

对我来说,它输出

/usr/local/bin/openssl

那么,

$ rvm install ruby-2.7.8 -C --with-openssl-dir=/usr/local/bin/openssl
© www.soinside.com 2019 - 2024. All rights reserved.