最近发现了homebrew的诸般便利,并且发现自己手动更新node和npm总是不是网络有问题就是什么有问题,动心把之前安装的node和npm手动都删掉了,高高兴兴地去用homebrew安装,结果发现高兴早了还有好多文件没删干净,这些在安装后报错并给提示,我就顺着它的提示一步步解决错误的地方,最后终于安装成功了,具体怎么解决这些错误就在这里记录一下。
一开始的错误是这样的:
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/doc/node/gdbinit
Target /usr/local/share/doc/node/gdbinit
already exists. You may want to remove it:
rm '/usr/local/share/doc/node/gdbinit'To force the link and overwrite all conflicting files:
brew link --overwrite nodeTo list all files that would be deleted:
brew link --overwrite --dry-run nodePossible conflicting files are:
/usr/local/share/doc/node/gdbinit
/usr/local/share/doc/node/lldb_commands.py
/usr/local/share/man/man1/node.1
/usr/local/share/sys