[英]Why do I get an error installing Ruby 1.8.7-p302 using RVM?
I get the following error when trying to RVM install 1.8.7-p302:尝试 RVM 安装 1.8.7-p302 时出现以下错误:
shawn-taylors-macbook-pro-2:~ shawntaylorphoto$ rvm install 1.8.7-p302 shawn-taylors-macbook-pro-2:~ shawntaylorphoto$ rvm install 1.8.7-p302... ...
ERROR: Error running './configure --prefix=/Users/shawntaylorphoto/.rvm/rubies/ruby-1.8.7-p302 --enable-shared --disable-install-doc ', please read /Users/shawntaylorphoto/.rvm/log/ruby-1.8.7-p302/configure.log ERROR: There has been an error while running configure.错误:错误运行'./configure --prefix=/Users/shawntaylorphoto/.rvm/rubies/ruby-1.8.7-p302 --enable-shared --disable-install-doc',请阅读/Users/shawntaylorphoto/ .rvm/log/ruby-1.8.7-p302/configure.log 错误:运行配置时出错。 Halting the installation停止安装
I checked the configure.log file as suggested, and get this:我按照建议检查了 configure.log 文件,并得到了这个:
[2011-07-16 14:55:30]./configure --prefix=/Users/shawntaylorphoto/.rvm/rubies/ruby-1.8.7-p302 --enable-shared --disable-install-doc checking build system type... i686-apple-darwin10.7.0 checking host system type... i686-apple-darwin10.7.0 checking target system type... i686-apple-darwin10.7.0 checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/Users/shawntaylorphoto/.rvm/src/ruby-1.8.7-p302': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details. [2011-07-16 14:55:30]./configure --prefix=/Users/shawntaylorphoto/.rvm/rubies/ruby-1.8.7-p302 --enable-shared --disable-install-doc 检查构建系统类型... i686-apple-darwin10.7.0 检查主机系统类型... i686-apple-darwin10.7.0 检查目标系统类型... i686-apple-darwin10.7.0 检查 gcc ... 不检查 cc ...不检查 cl.exe ...不配置:错误:在 `/Users/shawntaylorphoto/.rvm/src/ruby-1.8.7-p302' 中:配置:错误:在 $PATH 中找不到可接受的 C 编译器更多细节见“config.log”。
Is Xcode an acceptable C Compiler? Xcode 是可接受的 C 编译器吗? I would think so.我会这么认为。 I've got it in /Developer, but not in ~/Users/username/... Thinking this is the problem, and if so, can I tell RVM to look there for the C compiler, or is it better to install Xcode in the /user folder?我在 /Developer 中找到了它,但在 ~/Users/username/...在 /user 文件夹中?
Alternately, if I'm totally off and neither of these is the problem and solution, any other advice would be hugely appreciated!!!或者,如果我完全离开并且这些都不是问题和解决方案,任何其他建议将不胜感激!!!
~~~ ~~~
As per the Tin Man's instructions, here is按照铁皮人的指示,这里是
shawn-taylors-macbook-pro-2:~ shawntaylorphoto$ rvm info shawn-taylors-macbook-pro-2:~ shawntaylorphoto$ rvm 信息
system:系统:
system: uname: "Darwin shawn-taylors-macbook-pro-2.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386" bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)" zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"系统:uname:“Darwin shawn-taylors-macbook-pro-2.local 10.7.0 Darwin Kernel 版本 10.7.0:2011 年 1 月 29 日星期六 15:17:16 PST;root:xnu-1504.9.37~1/RELEASE_I386 i386 " bash: "/bin/bash => GNU bash,版本 3.2.48(1)-release (x86_64-apple-darwin10.0)" zsh: "/bin/zsh => zsh 4.3.9 (达尔文10.0)"
rvm: version: "rvm 1.6.23 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]" rvm:版本:“Wayne E. Seguin 的 rvm 1.6.23 (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]”
homes: gem: "not set" ruby: "not set"家园:宝石:“未设置” ruby:“未设置”
binaries: ruby: "/usr/bin/ruby" irb: "/usr/bin/irb" gem: "/usr/bin/gem" rake: "/usr/bin/rake"二进制文件:ruby:“/usr/bin/ruby” irb:“/usr/bin/irb” gem:“/usr/bin/gem” rake:“/usr/bin/rake”
environment: PATH:环境: 路径:
"/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Users/shawntaylorphoto/bin:/" GEM_HOME: "" GEM_PATH: "" MY_RUBY_HOME: "" IRBRC: "" RUBYOPT: "" gemset: "" "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Users/shawntaylorphoto/bin:/" GEM_HOME : "" GEM_PATH: "" MY_RUBY_HOME: "" IRBRC: "" RUBYOPT: "" gemset: ""
Note: I'm on OSX 10.6.7注意:我在 OSX 10.6.7
You will need to install the "Developer Tools" sub-system which is on your OS X install disc.您需要安装 OS X 安装光盘上的“开发者工具”子系统。
I suspect XCode needs to be in its default installation location.我怀疑 XCode 需要位于其默认安装位置。 On all my Macs that has been in /Developer
.在/Developer
中的所有 Mac 上。
Also, you don't say what version of the OS you are running, but there are buggy versions of XCode so it helps to have the most current version for your OS.此外,您没有说明您正在运行的操作系统版本,但 XCode 有错误版本,因此为您的操作系统提供最新版本会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.