错误,而在Mac OS上安装红宝石GTK2 X
问题描述:
我想我的系统上安装GTK2宝石,但我得到这个错误:错误,而在Mac OS上安装红宝石GTK2 X
MacBook-Air-de-Mateus:~ mateusgomesfreitas$ gem install gtk2
Building native extensions. This could take a while...
ERROR: Error installing gtk2:
ERROR: Failed to build gem native extension.
/Users/mateusgomesfreitas/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for GCC... yes
checking for rb_define_alloc_func() in ruby.h... yes
checking for rb_block_proc() in ruby.h... yes
checking for new allocation framework... yes
checking for attribute assignment... no
checking for Win32 OS... no
checking for gobject-2.0... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. 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=/Users/mateusgomesfreitas/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
--with-pkg-config
--without-pkg-config
--with-override-variables
--without-override-variables
Gem files will remain installed in /Users/mateusgomesfreitas/.rvm/gems/ruby-1.9.2- p290/gems/glib2-1.0.3 for inspection.
Results logged to /Users/mateusgomesfreitas/.rvm/gems/ruby-1.9.2-p290/gems/glib2-1.0.3/ext/glib2/gem_make.out
这里是我的gemlist:
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.10)
actionpack (3.0.10)
activemodel (3.0.10)
activerecord (3.0.10)
activeresource (3.0.10)
activesupport (3.0.10)
arel (2.0.10)
builder (2.1.2)
bundler (1.0.18)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.19)
mime-types (1.16)
mysql2 (0.3.7, 0.2.13)
pkg-config (1.1.2)
polyglot (0.3.2)
rack (1.2.4, 1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.10)
railties (3.0.10)
rake (0.9.2)
rdoc (3.9.4)
rubygems-update (1.8.10)
sqlite3 (1.3.4)
thor (0.14.6)
treetop (1.4.10)
tzinfo (0.3.29)
和我的红宝石版本: 红宝石1.9.2p290(2011-07-09修订32553)x86_64的-darwin11.0.1]
什么是I D错了吗?
答
@ MU-是太短是
现场安装GTK使用brew install gtk+
你已经安装了GTK +? '检查gobject-2.0 ...否'表明你没有glib(这是AFAIK,GTK需要的)。 –
我用git clone git://git.gnome.org/gtk+从http://www.gtk.org/download/index.php下载了gtk +,我仍然收到相同的错误 – Mateusgf
你编译过了吗?并安装它? [Brew](https://github.com/mxcl/homebrew)对于这类事情来说可能是最好的选择,只要在那里,你就可以'安装gtk +'来完成这个任务。 –