Ruby version: 2.2.5
Mac OSX: 10.11.5
Gem version: 2.4.8
Bundler version: 1.12.5
When I run gem install nokogiri -v '1.5.11'
, I got the following error:
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/Users/hwpeng/.rvm/rubies/ruby-2.2.5/bin/ruby -r ./siteconf20160707-31800-1ejznjc.rb extconf.rb
====ignored multiple lines====
make "DESTDIR=" install
make: /usr/local/bin/gmkdir: No such file or directory
make: *** [.RUBYARCHDIR.-.nokogiri.time] Error 1
make install failed, exit code 2
I noticed the error message said: make: /usr/local/bin/gmkdir: No such file or directory
.
I searched this in google and found a similar post but for cocopods: https://coderwall.com/p/ehijxg/fixing-error-installing-cocoapods-on-macos
The following commands solved my problem. If you have a different error message, please refer to http://www.nokogiri.org/tutorials/installing_nokogiri.html
brew install coreutils
gem install nokogiri -v '1.5.11'
sudo port install coreutils
gem install nokogiri -v '1.5.11'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With