【问题标题】:Adding /usr/bin/gcc-4.2 to path - installing ruby将 /usr/bin/gcc-4.2 添加到路径 - 安装 ruby
【发布时间】:2013-03-04 14:43:01
【问题描述】:

我正在尝试通过 rvm 安装 ruby​​。

rvm install ruby-1.9.3-p286

但我收到以下错误:

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p286.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
You requested building with '/usr/bin/gcc-4.2' but it is not in your path.

参考错误的最后一行,如何在我的路径中获取'usr/bin/gcc-4.2'?

我尝试将以下 PATH="/usr/bin:$PATH" 添加到我的 .bash_profile 中,但没有成功。

【问题讨论】:

  • 您的系统上是否安装了任何 GCC 编译器,如果有,是 GCC 4.2.x 吗?如果您根本没有任何 GCC,则需要获得一个(尽管 GCC 4.2 几乎不是最新的;那是 4.7.2,4.8 将在一两个月内发布)。如果您有 GCC,它是什么版本。如果是4.2.x版本,可以去/usr/binln -s gcc gcc-4.2问心无愧。如果您有更高版本,您可能会决定 fib,并且无论如何都做链接。但是你的问题是 /usr/bin/gcc-4.2 没有指向 GCC 的版本。

标签: ruby-on-rails ruby bash rvm


【解决方案1】:

运行以下命令:

rvm requirements

然后按照说明进行操作。

【讨论】:

  • osx/10.8/x86_64 的安装要求,可能需要 sudo 密码跳过 brew update 确保您的公式是最新的。 /Users/marty/.rvm/scripts/functions/build: line 68: /usr/bin/gcc-4.2: No such file or directory Doing /usr/local/etc/openssl cert.pem => 77ee3751.0跨度>
  • 这帮助我解决了原始帖子中的问题。 rvm requirements 打印出很多关于您的环境的有用信息,以及如何配置每个部分的建议。我已经在 CoderWall 上写了详细信息:coderwall.com/p/p1g2kg
猜你喜欢
  • 2011-06-03
  • 2013-04-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-05-21
  • 1970-01-01
  • 2020-04-21
  • 2019-04-29
相关资源
最近更新 更多