为什么我不能在Mac OSX Lion上安装Ruby 1.9.2? [英] Why am I not able to install Ruby 1.9.2 on Mac OSX Lion?

查看:137
本文介绍了为什么我不能在Mac OSX Lion上安装Ruby 1.9.2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在带OSX Lion(10.7.2)的全新MacBook Air上安装Ruby 1.9.2,并且在安装过程中始终收到错误消息.我是Ruby的新手,并且从Ruby on Rails 3教程开始,所以我下载了RVM,然后运行命令"$ rvm install 1.9.2".这就是发生的事情:

I am trying to install Ruby 1.9.2 on a brand new MacBook Air with OSX Lion (10.7.2) and I keep getting an error message during the installation process. I'm new to Ruby and starting out with Ruby on Rails 3 Tutorial, so I downloaded RVM and then ran the command "$ rvm install 1.9.2." and this is what happened:

Installing Ruby from source to: /Users/richardberger/.rvm/rubies/ruby-1.9.2-p290
ruby-1.9.2-p290 - #fetching 
ruby-1.9.2-p290 - #extracted to /Users/richardberger/.rvm/src/ruby-1.9.2-p290
Fetching yaml-0.1.4.tar.gz to /Users/richardberger/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/richardberger/.rvm/src
Configuring yaml in /Users/richardberger/.rvm/src/yaml-0.1.4.
ERROR: Error running ' ./configure --prefix="/Users/richardberger/.rvm/usr"  ',
please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/yaml/configure.log
Compiling yaml in /Users/richardberger/.rvm/src/yaml-0.1.4.
ERROR: Error running 'make ', please read
/Users/richardberger/.rvm/log/ruby-1.9.2-p290/yaml/make.log
Installing yaml to /Users/richardberger/.rvm/usr
ERROR: Error running 'make install', please read
/Users/richardberger/.rvm/log/ruby-1.9.2-p290/yaml/make.install.log
ruby-1.9.2-p290 - #configuring 
ERROR: Error running ' ./configure
--prefix=/Users/richardberger/.rvm/rubies/ruby-1.9.2-p290 --enable-shared
--disable-install-doc --with-libyaml-dir=/Users/richardberger/.rvm/usr ',
please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/configure.log
ERROR: There has been an error while running configure. Halting the installation.

任何帮助或替代解决方案将不胜感激.并且由于我是新手,请告诉我是否需要提供更多信息.

Any help or alternative solutions would be greatly appreciated. And since I am new to this, please let me know if I need to provide more info.

谢谢!

更新:这是配置日志中的信息:

UPDATE: here is the info from the configure log:

[2011-10-13 11:26:35]  ./configure
--prefix=/Users/richardberger/.rvm/rubies/ruby-1.9.2-p290
--enable-shared --disable-install-doc
--with-libyaml-dir=/Users/richardberger/.rvm/usr
configure: WARNING: unrecognized options: --with-libyaml-dir
checking build system type... i386-apple-darwin11.2.0
checking host system type... i386-apple-darwin11.2.0
checking target system type... i386-apple-darwin11.2.0
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in
`/Users/richardberger/.rvm/src/ruby-1.9.2-p290':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

这是否意味着我需要下载C编译器(例如XCode?)

Does this mean I need to download a C compiler (e.g. XCode?)

更新(2):通过下载Xcode解决了问题!

UPDATE (2): Problem solved by downloading Xcode!

推荐答案

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

好吧,您的Mac上没有安装Xtools开发套件!例如没有C编译器...

well, you don't have the Xtools development kit installed on your Mac! e.g. there is no C compiler...

您应该弹出计算机随附的OS X DVD或闪存驱动器,并安装Xtools , 然后尝试再次安装Ruby.

you should pop-in that OS X DVD or the Flash Drive which came with your computer, and install Xtools, and after that try to install Ruby again..

这篇关于为什么我不能在Mac OSX Lion上安装Ruby 1.9.2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆