Reputation: 165
I'm trying to install FFmpeg on my mac.
When I do
brew install ffmpeg --with-chromaprint --with-fdk-aac
--with-fontconfig --with-freetype --with-frei0r --with-game-music-emu --with-libass --with-libbluray --with-libbs2b --with-libcaca --with-libgsm --with-libmodplug --with-librsvg --with-libsoxr --with-libssh --with-libvidstab --with-libvorbis --with-libvpx --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-opus --with-rtmpdump --with-rubberband --with-sdl2 --with-snappy --with-speex --with-tesseract --with-theora --with-tools --with-two-lame --with-wavpack --with-webp --with-x265 --with-xz --with-zeromq --with-zimg
This happens when I try to use FFmpeg
dyld: Library not loaded: /usr/local/opt/rubberband/lib/librubberband.2.dylib
Referenced from: /usr/local/bin/ffmpeg
Reason: image not found
Abort trap: 6
Upvotes: 16
Views: 8763
Reputation: 453
There is a common issue with brew when upgrading Mac Os as laid out on brew.sh:
Upgrading macOS Upgrading macOS can cause errors like the following:
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.54.dylib configure: error: Cannot find libz Following a macOS upgrade it may be necessary to >reinstall the Xcode Command Line Tools and brew upgrade
all installed formula:
xcode-select --install brew upgrade
1. Step: uninstall command-line-tools
rm -rf /Library/Developer/CommandLineTools
(You probably have to sudo that command, but since you only should use sudo when you know, what you do, I didnt put it in the command). Source: Aaron Brager on Stackoverflow.
2. step: backup installed brew packages
Then you should back up your installed brew packages by
brew bundle
this command creates a brews.txt at your current location. check the content by
nano brews.txt
and leave it by pressing ctrl+x. remember the folder you saved that file in!
source: Tom Lankhorst.
3 step: uninstall homebrew
next step is to uninstall homebrew and all packages by
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
source: Ming C on stackoverflow.
4. step: reinstall everything
after that you install the command line-tools again by
xcode-select --install
and install homebrew again by
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
and last but not least you go into the folder you saved the bundle in (if it is in your users home folder, you type "cd ~") and restore all installed packages by
brew bundle
Common Issues
In my case where two packages that could not be installed. One was r, and the error read:
Could not symlink bin/R
Target /usr/local/bin/R
solution:
brew link --overwrite r
The other was Chromium:
Error: It seems there is already an App at '/Applications/Chromium.app'.
solution:
rm -r /Applications/Chromium.app/
brew cask install chromium
Upvotes: 2