question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Homebrew build fails with "fatal error: 'ffi.h' file not found"

See original GitHub issue

When I try to install conan from homebrew I get the following error

$ brew install conan
==> Downloading https://pypi.python.org/packages/fa/c6/f94d46dd2b958248114a86a8952882e67a6ace55c72b8600fd30bf85ce7f/co
Already downloaded: /Users/sam/Library/Caches/Homebrew/conan-0.10.0.tar.gz
==> Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-20.9.0.tar.gz
Already downloaded: /Users/sam/Library/Caches/Homebrew/conan--setuptools-20.9.0.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/Users/sam/.brew/Cellar/conan/0.10.0/libexec/vendor 
==> Downloading https://pypi.python.org/packages/d3/30/54c6dab05a4dec44db25ff309f1fbb6b7a8bde3f2bade38bb9da67bbab8f/ba
Already downloaded: /Users/sam/Library/Caches/Homebrew/conan--backport_ipaddress-0.1.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/Users/sam/.brew/Cellar/conan/0.10.0/libexec/vendor 
==> Downloading https://pypi.python.org/packages/e5/6e/13022066f104f6097a7414763c5658d68081ad0bc2b0630a83cd498a6f22/bo
Already downloaded: /Users/sam/Library/Caches/Homebrew/conan--boto-2.38.0.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/Users/sam/.brew/Cellar/conan/0.10.0/libexec/vendor 
==> Downloading https://pypi.python.org/packages/d2/59/e61e3dc47ed47d34f9813be6d65462acaaba9c6c50ec863db74101fa8757/bo
Already downloaded: /Users/sam/Library/Caches/Homebrew/conan--bottle-0.12.9.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/Users/sam/.brew/Cellar/conan/0.10.0/libexec/vendor 
==> Downloading https://pypi.python.org/packages/b6/98/11feff87072e2e640fb8320712b781eccdef05d588618915236b32289d5a/cf
Already downloaded: /Users/sam/Library/Caches/Homebrew/conan--cffi-1.6.0.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/Users/sam/.brew/Cellar/conan/0.10.0/libexec/vendor 
Last 15 lines from /Users/sam/Library/Logs/Homebrew/conan/05.python:
copying cffi/vengine_gen.py -> build/lib.macosx-10.12-intel-2.7/cffi
copying cffi/verifier.py -> build/lib.macosx-10.12-intel-2.7/cffi
copying cffi/_cffi_include.h -> build/lib.macosx-10.12-intel-2.7/cffi
copying cffi/parse_c_type.h -> build/lib.macosx-10.12-intel-2.7/cffi
copying cffi/_embedding.h -> build/lib.macosx-10.12-intel-2.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.macosx-10.12-intel-2.7
creating build/temp.macosx-10.12-intel-2.7/c
clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c c/_cffi_backend.c -o build/temp.macosx-10.12-intel-2.7/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
         ^
1 error generated.
error: command 'clang' failed with exit status 1

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-core/issues

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dgellowcommented, Dec 12, 2016

That was it, problem solved 😃

0reactions
memshardedcommented, Dec 12, 2016

Excellent, thanks for reporting 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

PIP install unable to find ffi.h even though it recognizes libffi
I have installed libffi on my Linux server as well as correctly set the PKG_CONFIG_PATH environment variable to the correct directory, as pip ......
Read more >
Solve fatal error: 'FFI. H' file not found | ProgrammerAH
H' file not found. The reason is the lack of libffi library, using BREW can be installed.
Read more >
Mac OS X install instructions - Google Groups
I was trying to pip install cffi, but kept getting the error c/_cffi_backend.c:14:10: fatal error: 'ffi.h' file not found. Finally I found a...
Read more >
GHC 9.2.1 on an m1 Mac error: `ffitarget_arm64.h` file not found
1) on an m1 Mac running macOS 12.0.1. I'm seeing this error when building an existing project: Failed to build wcwidth-0.0.2. Build ......
Read more >
doc/troubleshooting/ruby.md · main - GitLab Development Kit
gem install ffi fails with ' ffi.h file not found' · Ensure the PKG_CONFIG_PATH and LDFLAGS environment variables are correctly set: export ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found