4

我认为这并不重要,但我的 Github 服务回购分支是https://github.com/franklovecchio/github-services

当我尝试运行“sudo ruby​​ github-services.rb”来测试我的钩子时,它会尝试安装 eventmachine,这会给出以下错误(我可以安装其他 gem!)。我也做gem update了,但仍然得到同样的错误。bundlergem 也已安装。有人看到这个吗?

sudo ruby github-services.rb 
Password:
WARN The gem environment is out-of-date or has yet to be bootstrapped.
     Runnning script/bootstrap to remedy this situation...
Using rake (0.8.7) 
Using activesupport (3.0.10) 
Using builder (2.1.2) 
Using i18n (0.5.0) 
Using activemodel (3.0.10) 
Using activeresource (3.0.10) 
Using addressable (2.2.6) 
Installing eventmachine (0.12.10) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/local/Cellar/ruby/1.9.2-p180/bin/ruby extconf.rb 
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_thread_check_ints()... yes
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
creating Makefile

make
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o binder.o -c binder.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o cmain.o -c cmain.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o cplusplus.o -c cplusplus.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o ed.o -c ed.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o em.o -c em.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o emwin.o -c emwin.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o epoll.o -c epoll.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o files.o -c files.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o kb.o -c kb.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o page.o -c page.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o pipe.o -c pipe.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o rubymain.o -c rubymain.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o sigs.o -c sigs.cpp
/usr/bin/g++-4.2 -I. -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p180/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE -DWITH_SSL -DHAVE_MAKE_PAIR -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -w -pipe -O3 -fno-common -I/opt/local/include     -w -pipe -O3 -o ssl.o -c ssl.cpp
/usr/bin/g++-4.2 -dynamic -bundle -o rubyeventmachine.bundle binder.o cmain.o cplusplus.o ed.o em.o emwin.o epoll.o files.o kb.o page.o pipe.o rubymain.o sigs.o ssl.o -L. -L/usr/local/Cellar/ruby/1.9.2-p180/lib -L. -L/usr/local/Cellar/readline/6.2.1/lib -L/opt/local/lib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace  -lruby.1.9.1  -lssl -lcrypto -lz   -lpthread -ldl -lobjc 
ld: warning: ignoring file /opt/local/lib/libz.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: in /opt/local/lib/libz.1.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64) for architecture x86_64
collect2: ld returned 1 exit status
make: *** [rubyeventmachine.bundle] Error 1


Gem files will remain installed in /Users/franklovecchio/Desktop/development/github_services/vendor/gems/ruby/1.9.1/gems/eventmachine-0.12.10 for inspection.
Results logged to /Users/franklovecchio/Desktop/development/github_services/vendor/gems/ruby/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out
An error occured while installing eventmachine (0.12.10), and Bundler cannot continue.
Make sure that `gem install eventmachine -v '0.12.10'` succeeds before bundling.
bundle executable not found.  Ensure bundler is installed (`gem install bundler`) and that the gem bin path is in your PATH
WARN The gem environment is STILL out-of-date.
     Please contact your network administrator.
/Users/franklovecchio/Desktop/development/github_services/config/load.rb:26:in `<top (required)>': gem environment not configued (RuntimeError)
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from github-services.rb:1:in `<main>'

看着gem environment

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [x86_64-darwin10.7.0]
  - INSTALLATION DIRECTORY: /usr/local/Cellar/ruby/1.9.2-p180/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /usr/local/Cellar/ruby/1.9.2-p180/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/Cellar/ruby/1.9.2-p180/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-10
  - GEM PATHS:
     - /usr/local/Cellar/ruby/1.9.2-p180/lib/ruby/gems/1.9.1
     - /Users/franklovecchio/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://rubygems.org/", "http://gems.github.com"]
  - REMOTE SOURCES:
     - http://rubygems.org/
     - http://gems.github.com
4

1 回答 1

0
ld: warning: ignoring file /opt/local/lib/libz.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)

这是主要错误。检查 Zlib 端口,它是为 x86_64 安装的吗?你可以使用

port -v installed zlib 

如果没有安装 zlib,请安装它或者如果它已经安装。只是更新它。

此外,如果这没有帮助。看看Fixing ld: warning: in /usr/local/lib/libz.dylib, file is not required architecture

于 2012-08-15T06:45:58.033 回答