Reinstalling homebrew symbolic links after a restore

前端 未结 2 527
悲&欢浪女
悲&欢浪女 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: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 %'

提交回复
热议问题