bootstrap 4.2.1`bundle install`错误在安装ffi(1.10.0)时发生

时间:2019-01-13 00:33:26

标签: npm terminal bootstrap-4 ffi

我正在尝试在引导程序4.2.1上运行bundle install并收到此错误

An error occurred while installing ffi (1.10.0), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.10.0' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  jekyll-redirect-from was resolved to 0.14.0, which depends on
    jekyll was resolved to 3.8.5, which depends on
      jekyll-sass-converter was resolved to 1.5.2, which depends on
        sass was resolved to 3.7.3, which depends on
          sass-listen was resolved to 4.0.0, which depends on
            rb-inotify was resolved to 0.10.0, which depends on
              ffi

我尝试过的事情:

  • https://github.com/twbs/bootstrap上进行了所有操作
  • 运行了gem install ffi -v '1.10.0' --source 'https://rubygems.org/'gem install ffi
  • 已安装/更新的ruby
  • 简单安装openssl libyaml libffi
  • xcode-select --install
  • 将所有内容尝试了20次

人们说这是Mac Mojave问题...我搜索了所有其他问题,没有可用的修复程序。

如何解决?

2 个答案:

答案 0 :(得分:0)

从Mac store安装重量超过10gb的xcode(仅用于一对依赖)后,问题已修复

答案 1 :(得分:0)

vladhadzhiyski关于运行brew reinstall libffi的建议对我有用:

$ brew reinstall libffi
==> Reinstalling libffi
==> Downloading https://homebrew.bintray.com/bottles/libffi-3.2.1.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libffi-3.2.1.mojave.bottle.tar.gz
==> Caveats
libffi is keg-only, which means it was not symlinked into /usr/local,
because some formulae require a newer version of libffi.
For compilers to find libffi you may need to set:
  export LDFLAGS="-L/usr/local/opt/libffi/lib"
For pkg-config to find libffi you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
==> Summary
  /usr/local/Cellar/libffi/3.2.1: 16 files, 296.8KB
$ export LDFLAGS="-L/usr/local/opt/libffi/lib"
$ export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
$ bundle install