首页 > 解决方案 > 我无法在 macOS High Sierra 上安装 Jekyll。bundle 安装在 ffi 时停止 make 错误

问题描述

我正在尝试在 macOS 上安装 Jekyll,但安装gembundle install时命令失败。ffi下面是错误。

/bin/sh ./libtool  --tag=CC   --mode=link xcrun clang  -arch i386  -Wall -fexceptions -no-undefined
-version-info `grep -v '^#'
/private/var/folders/l7/th5yr79s4q91ln9ycpx4ht5h0000gn/T/bundler20190605-84487-xz6vrpffi-1.11.1/gems/ffi-1.11.1/ext/ffi_c/libffi/libtool-version`
'-arch' 'i386'  -arch i386 -o libffi.la -rpath /usr/local/lib src/prep_cif.lo src/types.lo src/raw_api.lo
src/java_raw_api.lo src/closures.lo  src/x86/ffi.lo src/x86/sysv.lo
libtool: link:  xcrun clang -dynamiclib  -o .libs/libffi.7.dylib  src/.libs/prep_cif.o src/.libs/types.o
src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/sysv.o   
-arch i386 -arch i386 -arch i386   -install_name  /usr/local/lib/libffi.7.dylib -compatibility_version 9
-current_version 9.0 -Wl,-single_module
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
Undefined symbols for architecture i386:
  "___x86.get_pc_thunk.bx", referenced from:
      _ffi_call_i386 in sysv.o
      _ffi_closure_raw_SYSV in sysv.o
      _ffi_closure_raw_THISCALL in sysv.o
  "___x86.get_pc_thunk.dx", referenced from:
      _ffi_closure_i386 in sysv.o
      _ffi_closure_STDCALL in sysv.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [libffi.la] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: ***
["/private/var/folders/l7/th5yr79s4q91ln9ycpx4ht5h0000gn/T/bundler20190605-84487-xz6vrpffi-1.11.1/gems/ffi-1.11.1/ext/ffi_c"/libffi-i386/.libs/libffi_convenience.a]
Error 2

make failed, exit code 2

Gem files will remain installed in
/var/folders/l7/th5yr79s4q91ln9ycpx4ht5h0000gn/T/bundler20190605-84487-xz6vrpffi-1.11.1/gems/ffi-1.11.1 for
inspection.
Results logged to
/var/folders/l7/th5yr79s4q91ln9ycpx4ht5h0000gn/T/bundler20190605-84487-xz6vrpffi-1.11.1/extensions/universal-darwin-17/2.3.0/ffi-1.11.1/gem_make.out

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

In Gemfile:
  github-pages was resolved to 198, which depends on
    github-pages-health-check was resolved to 1.16.1, which depends on
      typhoeus was resolved to 1.3.1, which depends on
        ethon was resolved to 0.12.0, which depends on
          ffi

标签: rubymacosrubygemsjekyll

解决方案


  • 尝试这个
$ open /Library/Developer/CommandLineTools/Packages/
  • 然后运行包
macOS_SDK_headers_for_macOS_10.14.pkg

答案是参考在这里输入链接描述,如果这项工作请给我投票谢谢


推荐阅读