本文介绍了gem install nokogiri -v'1.5.11'由于以下原因而失败:/usr/local/bin/gmkdir:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Mac OSX:10.11.5

Mac OSX: 10.11.5

宝石版本:2.4.8

Gem version: 2.4.8

捆绑器版本:1.1.25

Bundler version: 1.12.5

运行gem install nokogiri -v '1.5.11'时,出现以下错误:

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

推荐答案

我注意到错误消息:make: /usr/local/bin/gmkdir: No such file or directory.

I noticed the error message said: make: /usr/local/bin/gmkdir: No such file or directory.

我在google中搜索了此内容,并找到了类似的帖子,但找到了cocopods: https://coderwall.com/p/ehijxg/fixing-error-installing-cocoapods-on-macos

I searched this in google and found a similar post but for cocopods: https://coderwall.com/p/ehijxg/fixing-error-installing-cocoapods-on-macos

以下命令解决了我的问题.如果您有其他错误消息,请参考 http://www.nokogiri.org/tutorials/installation_nokogiri.html

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'

MacPorts

sudo port install coreutils
gem install nokogiri -v '1.5.11'

这篇关于gem install nokogiri -v'1.5.11'由于以下原因而失败:/usr/local/bin/gmkdir:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 11:42