Mac – homebrew broken after time machine restore

homebrewtime-machine

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…

Best Answer

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!