尝试在macOS Catalina上安装Jekyll时构建libffi gem本机扩展的问题

dmarticus

编辑:如果您想逐步完成所有步骤,我会在这里的博客上写出更详细的解决方案

我正在尝试gem install Jekyll使用Ruby通过homebrew安装并在macOS Catalina上通过Jekyll安装,并且遇到/usr/local/opt/ruby/bin/ruby以下错误

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/foobar/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ffi-1.9.21/ext/ffi_c
/Users/foobar/.rbenv/versions/2.5.1/bin/ruby -r ./siteconf20181118-49440-k8mjki.rb
extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for shlwapi.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
creating extconf.h
creating Makefile

current directory:
/Users/foobar/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ffi-1.9.21/ext/ffi_c
make "DESTDIR=" clean

current directory:
/Users/foobar/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ffi-1.9.21/ext/ffi_c
make "DESTDIR="
Running autoreconf for libffi
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4 --output=aclocal.m4t
Can't exec "aclocal": No such file or directory at
/usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
make: ***
["/Users/foobar/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-darwin18"/.libs/libffi_convenience.a]
Error 1

make failed, exit code 2

Gem files will remain installed in
/Users/foobar/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ffi-1.9.21 for inspection.
Results logged to
/Users/foobar/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-18/2.5.0-static/ffi-1.9.21/gem_make.out

An error occurred while installing ffi (1.9.21), and Bundler cannot continue.

我已经尝试通过更新我的Xcode命令行工具,xcode-select --install但是我得到了以下消息:

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

有谁知道我如何libffi在自己的机器上构建文件,以便杰基尔可以将其用作依赖项?

dmarticus

我知道了!感谢@ffleming在这里这是您需要做的:

  1. 使用以下命令在brew上重新安装libffi brew reinstall libffi
  2. 将新的brew安装的libffi标志添加到您的shell实例中,例如
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
  1. 运行gem install jekyll,您应该被分类!

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

错误:尝试安装罗盘时无法构建gem本机扩展

错误:无法生成gem本机扩展。尝试安装滑轨时

尝试在xubuntu 14.04上安装rails错误:无法构建gem本机扩展

尝试安装rails时出现此错误。错误:无法构建gem本机扩展。(Ubuntu 16.04)

我得到“无法构建gem本机扩展”。当我尝试安装mysql2(OSX)时

安装Jekyll时出现错误“无法构建gem本机扩展”

Gem :: Ext :: BuildError:错误:未能尝试尝试安装postgresql来生成gem本机扩展

无法构建gem本机扩展?

安装jekyll时发生错误:错误:无法构建gem本机扩展

Windows在安装Squib时无法构建gem本机扩展

安装nokogiri时出错:错误:无法构建gem本机扩展

安装 cocoapods 时出错:无法构建 gem 本机扩展

安装cocoapods时,gem本机扩展错误

安装gem会显示“无法构建gem本机扩展”。

MacOS Catalina 上的 Python 3.8 安装问题

在Rails上安装ruby时出错,无法构建gem本机扩展

安装JSON gem的本机扩展错误

尝试在macOS Catalina上安装Spring Tools App 4.7.0

无法安装json gem 1.8.6-无法在Ubuntu上构建gem本机扩展

安装 rails 错误:无法构建 gem 本机扩展

Ruby错误安装AF:无法构建gem本机扩展

安装rails失败,“无法构建gem本机扩展”

Gem :: Ext :: BuildError:错误:无法构建gem本机扩展

错误:无法在Windows上构建gem本机扩展

安装cocoapods时出错“ sudo gem install cocoapods” MacOs Catalina

无法安装 Rails。错误:安装导轨时出错:错误:无法构建 gem 本机扩展

尝试在macOS上安装Unity AndroidPlayer时安装失败

在OS X上安装PG gem-无法构建本机扩展

安装指南针时出错。无法构建gem本机扩展(指南针)