Xcode - 配置:错误:在 $PATH 中找不到可接受的 C 编译器

发布于 2025-01-06 20:24:02 字数 703 浏览 0 评论 0原文

从头开始重建 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

寂寞清仓 2025-01-13 20:24:03

您可以从 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.

一指流沙 2025-01-13 20:24:03

rbenv 安装错误:

configure: error: in `/tmp/ruby-build.20130911002344.31969/ruby-2.0.0-p0':
configure: error: no acceptable C compiler found in $PATH

...把我带到这里,

我目前正在 Rails 上安装 Ruby,通过 rbenv 在全新的 Debian 上安装 ruby​​,

原始命令是:

rbenv install 2.0.0-p0  

作为解决方案:

sudo apt-get install build-essential

干杯!

[对 Xcode ppl 表示抱歉]

rbenv install error :

configure: error: in `/tmp/ruby-build.20130911002344.31969/ruby-2.0.0-p0':
configure: error: no acceptable C compiler found in $PATH

...brought me here,

I am currently installing Ruby on rails, ruby through rbenv on a brand new Debian,

Original command is :

rbenv install 2.0.0-p0  

As a solution :

sudo apt-get install build-essential

Cheers !

[Sorry for the Xcode ppl]

寄居人 2025-01-13 20:24:03

阅读rvm requests,它显示了编译 ruby​​ 所需的内容。

Read rvm requirements it shows what you need to compile ruby.

赤濁 2025-01-13 20:24:02

关键步骤实际上是安装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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文