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.
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.
On Mac OS X you just need:
$ brew install libffi
depends_on
: 1. autoconf 2. automake 3. libtool We can then convert it to the following: 1. git clone github.com/libffi/libffi.git 2. cd libffi
3 ./autogen.sh
4. ./configure
5. make install
Homebrew shouldn't conflict with your Python, if it does you've probably installed Python via brew. You should probably be using venvs or something, it'll make your life much easier :-). –
Zrike 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.
This worked for me when paramiko python library was giving file not found error ::
ln -s /usr/local/opt/libffi/lib/libffi.dylib /usr/local/lib/libffi.7.dylib
© 2022 - 2025 — McMap. All rights reserved.
brew install libffi
. – Agreeablebrew install libffi
works on Mac. But I am confused that are libffi and libffi-dev the same thing? – Discomfiturexxx
andxxx-dev
, wherexxx
contains the minimum you need just to use a library or whatever, while thexxx-dev
package contains source code and other supporting files to enable you to modify and rebuild the package if needed. With Homebrew on Mac OS X you typically get all this in just onexxx
package, so you won't normally see separatexxx-dev
packages (although there are a few exceptions to this rule of thumb, e.g.google-chrome
andgoogle-chrome-dev
). – Agreeable