我在mac上安装cocoapods时遇到了问题。下面是我在终端中得到的错误代码。我不知道我做错了什么,我该怎么做才能解决这个问题。我已经尝试过google同样的问题,但没有任何问题。任何帮助都感激不尽。谢谢。
Building native extensions. This could take a while...
/opt/local/lib/ruby1.9/1.9.1/rubygems/ext/builder.rb:48: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
"/opt/local/bin/ruby" -rubygems /opt/local/lib/ruby1.9/gems/1.9.1/gems/rake-0.9.2.2/bin/rake RUBYARCHDIR=/opt/local/lib/ruby1.9/gems/1.9.1/gems/xcodeproj-0.16.1/ext RUBYLIBDIR=/opt/local/lib/ruby1.9/gems/1.9.1/gems/xcodeproj-0.16.1/ext
/opt/local/bin/ruby extconf.rb
/opt/local/lib/ruby1.9/1.9.1/rake/file_utils.rb:68: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
checking for -std=c99 option to compiler... *** 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
--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=/opt/local/bin/ruby
/opt/local/lib/ruby1.9/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:491:in `block in try_compile'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:443:in `with_werror'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:491:in `try_compile'
from extconf.rb:24:in `block in <main>'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:790:in `block in checking_for'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:254:in `open'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:284:in `block in postpone'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:254:in `open'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:280:in `postpone'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:789:in `checking_for'
from extconf.rb:23:in `<main>'
rake aborted!
Command failed with status (1): [/opt/local/bin/ruby extconf.rb...]
Tasks: TOP => default => ext
(See full trace by running task with --trace)
Gem files will remain installed in /opt/local/lib/ruby1.9/gems/1.9.1/gems/xcodeproj-0.16.1 for inspection.
Results logged to /opt/local/lib/ruby1.9/gems/1.9.1/gems/xcodeproj-0.16.1/ext/xcodeproj/gem_make.out