简体   繁体   English

为什么使用 RVM 安装 Ruby 1.8.7-p302 时出现错误?

[英]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.

相关问题 为什么在ubuntu 11.04上使用rvm安装Ruby 1.9.3时出现错误? - Why do I get an error installing Ruby 1.9.3 using rvm on ubuntu 11.04? 如何使用RVM将Ruby系统切换回1.8.7? - How do I switch Ruby system back to 1.8.7 using RVM? 在雪豹上用rvm安装`ruby-1.8.7-p334`时出错 - make error when installing `ruby-1.8.7-p334` with `rvm` on Snow Leopard 为什么在Ruby 1.8.7中编译IronRuby时出现错误? - Why do I get an error while compiling IronRuby in Ruby 1.8.7? 为什么在Mac OSX 10.6上使用RVM安装Ruby 1.9.3时会出现“文件不是必需的体系结构”的问题? - Why do I get “file is not of required architecture” installing Ruby 1.9.3 using RVM on Mac OSX 10.6? RVM-我需要Ruby 1.8.7才能安装Ruby 1.9吗? - RVM - Do I need Ruby 1.8.7 in order to install Ruby 1.9? 使用RVM安装ruby-2.0.0-p353时出错 - Error installing ruby-2.0.0-p353 using RVM 在RVM 1.9.3中安装ruby之后,可以在系统中(而不是在rvm中)安装Ruby v1.8.7吗? - Can I install Ruby v1.8.7 in System(not in rvm) after installing ruby in RVM 1.9.3 为什么使用RVM安装ruby-2.0.0-head时出现“运行'autoreconf'错误”错误? - Why do I get an “Error running 'autoreconf'” error using RVM to install ruby-2.0.0-head? 为什么我在Ruby 1.8.7中得到“未定义的方法'获取'用于数组”? - Why do I get “Undefined method `take' for Array” in Ruby 1.8.7?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM