我是Ruby的新手,在运行Mountain Lion OS的Mac上安装它时遇到了问题。任何帮助将是伟大的!!!
我已经遵循了一个教程,我已经安装了GIT,curl和RVM。下一步是安装Ruby,我试过了,但得到了以下错误
$ rvm install 1.9.2
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.2-p320.
It is not possible to build movable binaries for rubies 1.8-1.9.2, but you can do it for your system only.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing macports............
Error running 'requirements_osx_port_install_port',
showing last 15 lines of /Users/mikelgainza/.rvm/log/1388506081_ruby-1.9.2-p320/port_install.log
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking objc/objc.h usability... yes
checking objc/objc.h presence... yes
checking for objc/objc.h... yes
checking if linking libobjc requires pthreads... no
checking for Apple Objective-C runtime... yes
checking for GNU Objective C runtime... no
configure: Using Apple Objective-C runtime
checking for Apple Foundation library... no
configure: WARNING: GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library
configure: error: Could not find a working Foundation implementation
Requirements installation failed with status: 1.
我也尝试安装2.1.0。它找到了遥控器,但随后它给出了一些错误
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/osx/10.8/x86_64/ruby-2.1.0.tar.bz2
Checking requirements for osx.
Installing macports............
Error running 'requirements_osx_port_install_port',
showing last 15 lines of /Users/mikelgainza/.rvm/log/1388512995_ruby-2.1.0/port_install.log
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking objc/objc.h usability... yes
checking objc/objc.h presence... yes
checking for objc/objc.h... yes
checking if linking libobjc requires pthreads... no
checking for Apple Objective-C runtime... yes
checking for GNU Objective C runtime... no
configure: Using Apple Objective-C runtime
checking for Apple Foundation library... no
configure: WARNING: GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library
configure: error: Could not find a working Foundation implementation
Requirements installation failed with status: 1.
知道我哪里做错了吗
谢谢!
5条答案
按热度按时间aurhwmvo1#
首先,您需要从Mac App Store(免费)安装Apple Developers Toolkit(
XCode
)安装完成后,您需要通过运行以下命令来安装CLI命令行实用程序:
然后再次尝试安装,它应该为您工作。
此外,您可能希望安装最新版本的Ruby,在撰写本文时,它是
2.1.0
(通过rvm install 2.1.0
)最后,如果您还没有安装
homebrew
,我建议您也安装homebrew
,因为它还有一个额外的好处,可以检查运行时环境中的错误(通过brew doctor
)。您可以在此处找到说明:http://brew.sh/祝你好运!
thigvfpy2#
我也遇到过类似的问题
正如在Jekyll's Doc中所述,我安装了Xcode命令行工具
安装Xcode命令行工具如果您在安装Jekyll的依赖项时遇到问题,这些依赖项使用了本机扩展并使用了macOS,您将需要安装Xcode及其附带的命令行工具。在“首选项”→“下载”→“组件”中下载。安装xcode后,选择:
然后我成功安装了Ruby 2.3.0。
bxpogfeg3#
决定:
删除掉下来的包,然后再次运行
查看可用的软件包
如有需要,则没有。更新包列表
安装所需的Ruby
6gpjuf904#
我得到了同样的错误-对我来说,这是一个问题与Homebrew -最后一行的命令日志说:
然后我运行了
brew update
,它给了我另一个错误消息,并指示如何修复它。在我按照brew的说明操作之后,我能够安装Ruby了。0h4hbjxa5#
运行: