LoginSignup
1
0

More than 3 years have passed since last update.

ffi-1.11.1がMac OSX High Sierraでのインストールでコケる件

Last updated at Posted at 2019-07-20

解決するのがめんどくさかったのでメモしておく

brewでlibffiを予めインストール

$ brew install libffi

linkを試みるとこんなメッセージがでてくるので PKG_CONFIG_PATH のほうをコピっておく

$ brew link --force libffi
Warning: Refusing to link macOS-provided software: 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"

ffiのgemをインストールする際に PKG_CONFIG_PATH を指定

$ PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig" gem install ffi
Building native extensions. This could take a while...
Successfully installed ffi-1.11.1
Parsing documentation for ffi-1.11.1

見事インストールされた

参考: https://hawksnowlog.blogspot.com/2019/05/homebrew-ruby-ffi-pkgconfig.html

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0