FFmpeg macos install Reason: image not found

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

This should fix the problem:

$ brew reinstall ffmpeg