Reinstalling homebrew symbolic links after a restore

前端 未结 2 525
悲&欢浪女
悲&欢浪女 2021-02-09 01:30

I restored my Mac running 10.9 from time machine after a re-install but it appears that the symbolic links under /usr/local/bin for some of the formulas were lost.

相关标签:
2条回答
  • 2021-02-09 01:50

    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 restart your machine once, it will work.

    0 讨论(0)
  • 2021-02-09 01:57

    Instead of reinstating the symlinks, the better way to do it would be to use brew link.

    For a given binary which isn't in /usr/local/bin, e.g. yasm, run brew unlink yasm && brew link yasm.

    You can run this for all of your packages using xargs, like so:

    brew list | xargs -I % sh -c 'brew unlink %; brew link %'

    0 讨论(0)
提交回复
热议问题