bcrypt-ruby 3.1.2 Gem :: Ext :: BuildError:错误:无法在OSX中构建gem本机扩展 [英] bcrypt-ruby 3.1.2 Gem::Ext::BuildError: ERROR: Failed to build gem native extension in OSX
问题描述
我在使用ruby 2.1.10版本,OSX El Capitan和以下错误描述时遇到了这个问题:
I encounter this issue with ruby version 2.1.10, OSX El Capitan and the description of error as below:
安装具有本机扩展名的bcrypt-ruby 3.1.2
Installing bcrypt-ruby 3.1.2 with native extensions
Gem :: Ext :: BuildError:错误:无法构建gem本机扩展.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
checking for ruby/util.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling bcrypt_ext.c
compiling crypt.c
compiling crypt_blowfish.c
compiling crypt_gensalt.c
compiling wrapper.c
linking shared-object bcrypt_ext.bundle
ld: warning: directory not found for option '- L/Users/travis/.sm/pkg/active/lib'
make "DESTDIR=" install
make: /usr/local/bin/gmkdir: No such file or directory
make: *** [.RUBYARCHDIR.time] Error 1
make install failed, exit code 2
推荐答案
在OS X El Capitan中升级到Ruby 2.1.x时: 对于要构建的某些本机扩展,您需要确保已安装coreutils软件包.
When upgrading to Ruby 2.1.x in OS X El Capitan: For some of the native extensions to build you need to make sure that the coreutils package is installed.
要执行此操作,请执行以下操作:
To do this run:
brew install coreutils
这也可能导致雨滴,pg,kgio,http_parser,fast-stemmer,unf_ext,ffi,debug-inspector和nokogiri的类似故障
This could also cause similar failures for raindrops, pg, kgio, http_parser, fast-stemmer, unf_ext, ffi, debug-inspector, and nokogiri
这篇关于bcrypt-ruby 3.1.2 Gem :: Ext :: BuildError:错误:无法在OSX中构建gem本机扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!