我正在尝试在我的系统上安装gtk2 gem,但是我收到了这个错误:
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)
和我的红宝石版本: ruby 1.9.2p290(2011-07-09修订版32553)[x86_64-darwin11.0.1]
我做错了什么?
答案 0 :(得分:0)
@ mu-is-too-short is spot on
使用brew install gtk+