首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >尝试安装Ruby 1.9.3-p547退出并显示警告:无法识别的选项:-- with -libyaml-dir,--with-readline-dir

尝试安装Ruby 1.9.3-p547退出并显示警告:无法识别的选项:-- with -libyaml-dir,--with-readline-dir
EN

Stack Overflow用户
提问于 2014-05-28 17:50:08
回答 1查看 2.7K关注 0票数 2

在过去的两天里,我一直在尝试在带有rbenv的OS X 10.9.3上安装Ruby 1.9.3-p547:

代码语言:javascript
复制
CC="/usr/local/Cellar/gcc/4.8.3/bin/gcc" rbenv install 1.9.3-p547

但它一直报告一个错误:

代码语言:javascript
复制
Installing ruby-1.9.3-p547...

BUILD FAILED

Inspect or clean up the working tree at /var/folders/6t/33jmvscd6vg_tlqk40c4vsg80000gp/T/ruby-build.20140528111136.82977
Results logged to /var/folders/6t/33jmvscd6vg_tlqk40c4vsg80000gp/T/ruby-build.20140528111136.82977.log

Last 10 log lines:
x ruby-1.9.3-p547/golf_prelude.c
/var/folders/6t/33jmvscd6vg_tlqk40c4vsg80000gp/T/ruby-build.20140528111136.82977/ruby-1.9.3-p547 /var/folders/6t/33jmvscd6vg_tlqk40c4vsg80000gp/T/ruby-build.20140528111136.82977  ~/code/dpplus
configure: WARNING: unrecognized options: --with-libyaml-dir, --with-readline-dir
checking build system type... x86_64-apple-darwin13.2.0
checking host system type... x86_64-apple-darwin13.2.0
checking target system type... x86_64-apple-darwin13.2.0
checking whether the C compiler works... no
configure: error: in `/var/folders/6t/33jmvscd6vg_tlqk40c4vsg80000gp/T/ruby-    build.20140528111136.82977/ruby-1.9.3-p547':
configure: error: C compiler cannot create executables
See `config.log' for more details

BUILD FAILED

Inspect or clean up the working tree at /var/folders/6t/33jmvscd6vg_tlqk40c4vsg80000gp/T/ruby-build.20140528111136.82977
Results logged to /var/folders/6t/33jmvscd6vg_tlqk40c4vsg80000gp/T/ruby-build.20140528111136.82977.log

Last 10 log lines:
/var/folders/6t/33jmvscd6vg_tlqk40c4vsg80000gp/T/ruby-build.20140528111136.82977/ruby-1.9.3-p547 /var/folders/6t/33jmvscd6vg_tlqk40c4vsg80000gp/T/ruby-build.20140528111136.82977 ~/code/dpplus
configure: WARNING: unrecognized options: --with-libyaml-dir, --with-readline-dir
checking build system type... x86_64-apple-darwin13.2.0
checking host system type... x86_64-apple-darwin13.2.0
checking target system type... x86_64-apple-darwin13.2.0
checking whether the C compiler works... no
configure: error: in `/var/folders/6t/33jmvscd6vg_tlqk40c4vsg80000gp/T/ruby-    build.20140528111136.82977/ruby-1.9.3-p547':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.

我一直在尝试使用gcc 4.8.3,gcc 4.6,readline和libyaml (都是Homebrew的)。它适用于apple-gcc42 (也来自Homebrew ),但这给Spring-gem带来了一个问题。

EN

回答 1

Stack Overflow用户

发布于 2014-06-06 05:41:26

我也遇到了同样的问题,我错过了Xcode命令行工具。我用以下命令安装了它:

代码语言:javascript
复制
xcode-select --install

希望这对你有帮助。

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

https://stackoverflow.com/questions/23908245

复制
相关文章

相似问题

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