新手问题 安装 ruby-china 出错

sanvi · 2012年09月25日 · 最后由 taozui 回复于 2013年01月31日 · 3408 次阅读

Installing kgio (2.7.4) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/Users/SanviLu/Documents/rails_one_click/ruby/bin/ruby extconf.rb checking for CLOCK_MONOTONIC in time.h... no checking for CLOCK_MONOTONIC() in time.h... no checking for clockid_t in time.h... no checking for clock_gettime() in -lrt... no checking for t_open() in -lnsl... no checking for socket() in -lsocket... no checking for poll() in poll.h... yes checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... yes checking for getnameinfo() in sys/types.h,sys/socket.h,netdb.h... yes checking for struct sockaddr_storage in sys/types.h,sys/socket.h... yes checking for accept4() in sys/socket.h... no checking for sys/select.h... yes checking for ruby/io.h... yes checking for rb_io_t.fd in ruby.h,ruby/io.h... yes checking for rb_io_t.mode in ruby.h,ruby/io.h... yes checking for rb_io_t.pathv in ruby.h,ruby/io.h... yes checking for struct RFile in ruby.h,ruby/io.h... yes checking size of struct RFile in ruby.h,ruby/io.h... *** 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/SanviLu/Documents/rails_one_click/ruby/bin/ruby --with-rtlib --without-rtlib --with-nsllib --without-nsllib --with-socketlib --without-socketlib /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:597:in Integer': can't convert nil into Integer (TypeError) from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:597:inblock in try_constant' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:330:in popen' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:330:inblock in xpopen' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:254:in open' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:323:inxpopen' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:596:in try_constant' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:1156:inblock in check_sizeof' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:790:in block in checking_for' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:284:inblock (2 levels) in postpone' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:254:in open' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:284:inblock in postpone' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:254:in open' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:280:inpostpone' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:789:in checking_for' from /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/1.9.1/mkmf.rb:1155:incheck_sizeof' from extconf.rb:40:in `

'

Gem files will remain installed in /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/gems/1.9.1/gems/kgio-2.7.4 for inspection. Results logged to /Users/SanviLu/Documents/rails_one_click/ruby/lib/ruby/gems/1.9.1/gems/kgio-2.7.4/ext/kgio/gem_make.out An error occurred while installing kgio (2.7.4), and Bundler cannot continue. Make sure that gem install kgio -v '2.7.4' succeeds before bundling.

怎么回事? 系统是 mac osx 10.8

这个怎么解决,求大神指导

需要 登录 后方可回复, 如果你还没有账号请 注册新账号