Github Services / Ruby Gem eventmachine Проблеми с инсталирането на Mac

Не мисля, че има особено значение, но моят клон на Github Services repo е https://github.com/franklovecchio/github-services

Когато се опитам да стартирам „sudo ruby ​​github-services.rb“, за да тествам моята кука, той се опитва да инсталира eventmachine, което дава грешката по-долу (мога да инсталирам други скъпоценни камъни!). Направих и gem update, но все още получавам същата грешка. Скъпоценният камък bundler също е инсталиран. Някой виждал ли е това?

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

person Community    schedule 11.04.2012    source източник
comment
грешките изглежда идват от /opt/local/lib/libz.1.dylib. Подозирам, че на вашия компютър има предишна инсталация на macports, компилирана за друга архитектура, различна от x86_64   -  person hellvinz    schedule 20.06.2012


Отговори (1)


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 НЕ е инсталиран, инсталирайте го или ако вече е инсталиран. просто го актуализирайте.

Освен това, ако това не помогне. Разгледайте Коригиране на ld: предупреждение: в /usr/local/lib/libz.dylib файлът не е с необходимата архитектура

person CuriousMind    schedule 15.08.2012