【问题标题】:bcrypt-ruby 3.1.2 Gem::Ext::BuildError: ERROR: Failed to build gem native extension in OSXbcrypt-ruby 3.1.2 Gem::Ext::BuildError: ERROR: Failed to build gem native extension in OSX
【发布时间】:2016-10-02 20:17:18
【问题描述】:

我在 ruby​​ 版本 2.1.10,OSX El Capitan 遇到这个问题,错误描述如下:

使用原生扩展安装 bcrypt-ruby 3.1.2

Gem::Ext::BuildError: ERROR: 未能构建 gem 原生扩展。

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

【问题讨论】:

    标签: ruby-on-rails ruby macos


    【解决方案1】:

    在 OS X El Capitan 中升级到 Ruby 2.1.x 时: 对于要构建的一些本机扩展,您需要确保已安装 coreutils 包。

    为此运行:

    brew install coreutils

    这也可能导致 raindrops、pg、kgio、http_parser、fast-stemmer、unf_ext、ffi、debug-inspector 和 nokogiri 的类似故障

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-06
      • 2020-12-11
      • 2021-08-14
      • 2020-11-11
      • 2014-03-03
      • 2019-04-18
      • 2021-02-08
      相关资源
      最近更新 更多