I use home-brew for some tools on my macbook and it had been working fine. I recently put a SSD in my macbook and restored it to a time machine backup as I thought this would give me a pretty good replica of what my system was previously. However, since doing that, whenever I call a command that home-brew installed I am given the following error:

-bash: ffmpeg: command not found

ffmpeg is just one example. All of my commands are listed when I enter brew list so its not as if they aren't there at all. The brew command itself still works (brew help, brew doctor etc) so that isn't missing.

I still have the old hard drive where it all worked fine. What files should I copy over from there to get my brew packages to run properly again? Or is there a brew command I can use that will fix it all for me? I tried brew doctor and brew upgrade ffmpeg but that didn't help.

How can I get this running again? Preferably avoiding uninstalling everything and starting again...

  • Does /usr/local/bin/ffmpeg or /usr/local/Cellar/ffmpeg/*/bin/ffmpeg work? You could also try running brew unlink ffmpeg;brew link ffmpeg or brew uninstall ffmpeg;brew install ffmpeg.
    – Lri
    Mar 29, 2014 at 9:55
  • sam$ /usr/local/Cellar/ffmpeg/2.1.4/bin/ffmpeg dyld: Library not loaded: /usr/local/lib/libx264.125.dylib Referenced from: /usr/local/Cellar/ffmpeg/2.1.4/bin/ffmpeg Reason: image not found Trace/BPT trap: 5 So that didn't work. Uninstall ffmpeg then install ffmpeg does work but thats just a real pain to have to do for every package that I have! Im really not happy with Time Machine for this... I thought the whole idea was that it backed EVERYTHING up for this scenario :(
    – Sam
    Mar 29, 2014 at 12:09
  • possible duplicate of packages installed with Homebrew not found after restore
    – Mike
    Nov 4, 2014 at 0:40

1 Answer 1


you can brew unlink and brew link for each app.

if its painful for you, you can back up from your timemachine "after boot".

if you import data from your timemachine at starting your machine, brew broken.

but after you start up your machine at once, you will success!

  • 1
    or you can just do this ::> brew link $(brew list)
    – konqui
    Jul 3, 2014 at 5:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .