Home  >  Q&A  >  body text

ruby - OS X下安装EventMachine报错:cc1plus: error: unrecognized command line option "-arch"

这个是我在SO上的提问,可以去看一下。

过程:

sudo gem install eventmachine

...

Building native extensions.  This could take a while...
/Users/kuankuan/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems/ext/builder.rb:48: warning: Insecure world writable dir /usr/local/bin/g4bin in PATH, mode 040777
ERROR:  Error installing eventmachine:
    ERROR: Failed to build gem native extension.

        /Users/kuankuan/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb
/Users/kuankuan/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb:1344: warning: Insecure world writable dir /usr/local/bin/g4bin in PATH, mode 040777
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
compiling binder.cpp
cc1plus: error: unrecognized command line option "-arch"
make: *** [binder.o] Error 1

ruby版本:1.9.3 Mac OSX 10.8.3

ringa_leeringa_lee2713 days ago876

reply all(1)I'll reply

  • 黄舟

    黄舟2017-04-21 11:17:29

    Khan, I have the same machine as you and the same configuration, and it can be installed in just 1 second with just one command. This is so difficult to answer. What version of Xcode do you have, and has commandline been upgraded? Generally, errors in the Ruby environment under Mac will be related to this. .

    reply
    0
  • Cancelreply