gpt4 book ai didi

ruby - 为什么我无法在 Mac OSX Lion 上安装 Ruby 1.9.2?

转载 作者:数据小太阳 更新时间:2023-10-29 07:34:52 26 4
gpt4 key购买 nike

<分区>

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

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.

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

谢谢!

更新:这里是来自配置日志的信息:

[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?)

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

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com