Library not loaded: /opt/local/lib/libffi.5.dylib, but I use homebrew

I am trying to work with Mac OS X Lion (Xcode 4.3 + OSX GCC Installer + Homebrew)

Error message:

Library not loaded: /opt/local/lib/libffi.5.dylib

I do not have a directory /opt/localsince I do not use MacPorts, but Homebrew

I tried brew install libffi, which was successful, but the stone still does not work.

I also tried uninstalling and reinstalling gem without success.

The problem also occurs on OSX 10.9 (Mavericks) with it installed apple-gcc42.

I also tried to talk gemabout the presence of libffi as follows:

gem install ffi:1.0.7 -- --with-ldflags='-L/usr/local/opt/libffi/lib'

+5
source share
4 answers

MacPorts ( , , ). /.

, :

$ sudo port install libffi
+1

otool install_name_tool . . dylib.

0

rvm, , ffi gem

gem uninstall ffi

gem install ffi ##or inside rails project folder run bundle install

0

, Mac OS X ffi gem. .

In my case, ffi version 1.0.7 was specified in the Gemfile project. My tests failed with Library not loaded: /opt/local/lib/libffi.5.dylibthis version, but if I tried the latest version 1.9.3, it was installed and worked without fuss.

I was lucky, and the need for this restriction for the project was set many years ago and is no longer a requirement. So in the end, I moved forward with a later version of ffi gem.

I suspect there might be a way to get version 1.0.7 happily installed and work with OS X 10.9.2, but I don't know what it could be.

0
source

All Articles