Reputation: 401
I'm trying to install ffmpeg
with Homebrew using the command
brew install ffmpeg --with-freetype
but get
ERROR: freetype2 not found using pkg-config
If I check /usr/local/lib/pkgconfig
, the file freetype2.pc
exists. In fact,
pkg-config --list-all
includes freetype2
.
I've tried reinstalling pkg-config
and freetype
with Homebrew, reinstalling git
, updating Homebrew, upgrading Homebrew, uninstalling and reinstalling all Homebrew packages, etc.
brew doctor
gives mostly a bunch of warnings about dylibs, config scripts, and header files, probably from recently moving to a new machine and copying files. I thought the config scripts might be related, but they're all pyenv
shims.
I'm ok with a nuclear fix, but I feel like I've tried every nuclear option I know other than creating an entirely new user account.
Upvotes: 0
Views: 2255
Reputation: 401
I was finally successful, although I'm not sure if every step that follows was required.
brew bundle
to save a list of all brews in the file ./Brewfile
. rm
the contents of the local
directory the uninstaller recommends.)brew bundle
to reinstall brews from Brewfile
(must have working directory with Brewfile
).xquartz
via brew cask uninstall xquartz
ffmpeg
with brew install ffmpeg --with-freetype
... no error!xquartz
with brew cask install xquartz
I think steps 4-6 might have worked without 1-3, but I'm not positive because after step 3 I had a new error from the ffmpeg
installation:
libavdevice/xcbgrab.c:25:10: fatal error: 'xcb/xcb.h' file not found
I thought to try uninstalling xquartz
due to this obscure comment in a thread describing this second error.
Upvotes: 2