简体   繁体   English

安装Ruby Gem在OSX 10.10 Yosemite上不起作用

[英]Installing Ruby Gem Not working on OSX 10.10 Yosemite

I am trying to install Github Linguist ruby gem through terminal in Mac . 我正在尝试通过Mac终端安装Github Linguist红宝石。

I don't have enough points to upload image so please bear with me. 我的积分不足,无法上传图片,请耐心等待。

This is error it is showing when I install it in terminal :- 当我将其安装在终端时,这是显示的错误:-

bash-3.2# gem install github-linguist bash-3.2# gem安装github-linguist

Building native extensions. 构建本机扩展。 This could take a while... 这可能需要一段时间...

ERROR: Error installing github-linguist: 错误:安装github-linguist时出错:

ERROR: Failed to build gem native extension. 错误:无法生成gem本机扩展。

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150321-444-15aw05d.rb extconf.rb

checking for gmake... no checking for make... yes checking for cmake... no ERROR: CMake is required to build Rugged. 检查gmake ...不检查make ...是检查cmake ...否错误:CMake是构建Rugged所必需的。 * extconf.rb failed * Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. * extconf.rb失败*由于某些原因(可能缺少必要的库和/或头文件)而无法创建Makefile。 Check the mkmf.log file for more details. 检查mkmf.log文件以获取更多详细信息。 You may need configuration options. 您可能需要配置选项。

Provided configuration options: 提供的配置选项:

--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--use-system-libraries

extconf failed, exit code 1 extconf失败,退出代码1

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/rugged-0.22.1b1 for inspection. 宝石文件将保留安装在/Library/Ruby/Gems/2.0.0/gems/rugged-0.22.1b1中进行检查。 Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/rugged-0.22.1b1/gem_make.out 结果记录到/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/rugged-0.22.1b1/gem_make.out

brew install cmake应该可以解决问题

I know you are not asking how to manager Ruby's versions. 我知道您不是在问如何管理Ruby的版本。 but starting to use RVM will help a lot. 但是开始使用RVM会有很大帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM