Xcode - 配置:错误:在 $PATH 中找不到可接受的 C 编译器
从头开始重建 Mac。安装了 xcode 和 rvm,然后尝试安装 rubies,但它们都给了我:
Error running ' ./configure --prefix=/Users/durrantm/.rvm/rubies/ruby-1.9.3-p125
--enable-shared --disable-install-doc --with-libyaml
--with-opt-dir=/Users/durrantm/.rvm/usr ',
please read /Users/durrantm/.rvm/log/ruby-1.9.3-p125/configure.log
There has been an error while running configure. Halting the installation.
Michaels-MacBook-Air:~ durrantm$
日志有:
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/durrantm/.rvm/src/ruby-1.9.2-p290':
configure: error: no acceptable C compiler found in $PATH
我需要 gcc C 编译器吗?我该如何安装它?
rebuilding a mac from scratch. Installed xcode and rvm then trying to install rubies but they are all giving me:
Error running ' ./configure --prefix=/Users/durrantm/.rvm/rubies/ruby-1.9.3-p125
--enable-shared --disable-install-doc --with-libyaml
--with-opt-dir=/Users/durrantm/.rvm/usr ',
please read /Users/durrantm/.rvm/log/ruby-1.9.3-p125/configure.log
There has been an error while running configure. Halting the installation.
Michaels-MacBook-Air:~ durrantm$
The log has:
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/durrantm/.rvm/src/ruby-1.9.2-p290':
configure: error: no acceptable C compiler found in $PATH
Do I need the gcc C compliler? How do I install it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以从 App store 安装 Xcode,或者如果您拥有注册的免费开发人员帐户,则可以从 http 下载 XCode 命令行工具://developer.apple.com/downloads
安装完毕后,您可以继续使用 rvm 安装 rubies。
Either you install Xcode from the App store or if you have a registered free developer account you can download the XCode command line tools from http://developer.apple.com/downloads
Once you have that installed you can go ahead and install your rubies with rvm.
rbenv 安装错误:
...把我带到这里,
我目前正在 Rails 上安装 Ruby,通过 rbenv 在全新的 Debian 上安装 ruby,
原始命令是:
作为解决方案:
干杯!
[对 Xcode ppl 表示抱歉]
rbenv install error :
...brought me here,
I am currently installing Ruby on rails, ruby through rbenv on a brand new Debian,
Original command is :
As a solution :
Cheers !
[Sorry for the Xcode ppl]
阅读
rvm requests
,它显示了编译 ruby 所需的内容。Read
rvm requirements
it shows what you need to compile ruby.关键步骤实际上是安装Xcode命令行工具在下载完成并且安装Xcode
下载并安装之后从应用商店安装 Xcode,您需要实际安装它提供的命令行工具。
为此,请打开 Xcode,转到首选项,然后下载。有一个“安装”链接来添加命令行工具。
完成后,请确保重新打开终端窗口。
The critical step is actually installing the Xcode command line tools after the download completes and Xcode is installed
After downloading and installing Xcode from the app store, you need to actually install the command line tools it provides.
To do this open Xcode, go to preferences then downloads. There is an "Install" link to add the command line tools.
Once this has been completed, make sure to re-open your terminal window.