Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install libffi-dev on Mac OS X

I am trying to implement micropython on unix, which requires libffi-dev. I installed in this way brew install libffi-dev. But it seems that there is no libffi-dev can be found.

Is there any way to install libffi-dev on Mac os. Thank you.

like image 261
Xiufen Xu Avatar asked Jun 22 '17 17:06

Xiufen Xu


2 Answers

On Mac OS X you just need:

$ brew install libffi
like image 156
Paul R Avatar answered Sep 17 '22 16:09

Paul R


Error:

Library not loaded: /usr/local/opt/libffi/lib/libffi.7.dylib

The following worked (it’s not an ln -s but it did the trick):

sudo mkdir /usr/local/opt/libffi
sudo mkdir /usr/local/opt/libffi/lib
sudo cp /usr/lib/libffi.dylib /usr/local/opt/libffi/lib/libffi.7.dylib

Turns out Xcode already installs a library, it’s just not in the right spot.

like image 44
Paul Kenjora Avatar answered Sep 21 '22 16:09

Paul Kenjora