Fixing Error installing cocoapods on MacOS
If you installing cocoapods on a vanilla MacOS System you might get some error like this:
# sudo gem install cocoapods
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
creating Makefile
make
gcc -I. -I/usr/local/include/ruby-1.9.1/x86_64-darwin10.6.0 -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -DJSON_GENERATOR -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -D_XOPEN_SOURCE=1 -fno-common -pipe -O3 -Wall -O0 -ggdb -o generator.o -c generator.c
gcc -dynamic -bundle -o generator.bundle generator.o -L. -L/usr/local/lib -L. -L/usr/local/lib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lpthread -ldl -lobjc
make install
/opt/local/bin/gmkdir -p /usr/local/lib/ruby/gems/1.9.1/gems/json-1.8.0/ext/json/ext/generator/.gem.20130925-59217-5zt5ke/json/ext
make: /opt/local/bin/gmkdir: No such file or directory
make: *** [/usr/local/lib/ruby/gems/1.9.1/gems/json-1.8.0/ext/json/ext/generator/.gem.20130925-59217-5zt5ke/json/ext] Error 1
The important error is make: /opt/local/bin/gmkdir: No such file or directory
You need to install coreutils for fixing this.
With MacPorts:
sudo port install coreutils
For Homebrew:
sudo brew install coreutils
Written by Philipp Haußleiter
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Macos
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#