homebrew broken after time machine restore
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!