2
我想我的系統上安裝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錯了嗎?
你已經安裝了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 +'來完成這個任務。 –