【问题标题】:I am unable to install Jekyll on macOs High Sierra. bundle install stops on ffi make error我无法在 macOS High Sierra 上安装 Jekyll。 bundle 安装在 ffi 时停止 make 错误
【发布时间】:2019-10-20 15:48:34
【问题描述】:

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

/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

【问题讨论】:

    标签: ruby macos rubygems jekyll


    【解决方案1】:
    • 试试这个
    $ open /Library/Developer/CommandLineTools/Packages/
    
    • 然后运行包
    macOS_SDK_headers_for_macOS_10.14.pkg
    

    答案参考这里enter link description here, 如果这项工作请给我一票谢谢

    【讨论】:

    • 我安装了命令行工具,但不在开发者文件夹中...还有其他位置吗?
    • 先检查是否安装了命令行工具使用/usr/bin/xcodebuild -version,如果是则使用grep查找位置在哪里
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-06-02
    • 1970-01-01
    • 2018-12-05
    • 2018-08-13
    • 2018-06-11
    • 2018-01-27
    • 1970-01-01
    相关资源
    最近更新 更多