Brew清理错误:权限被拒绝@ unlink_internal [英] Brew cleanup Error: Permission denied @ unlink_internal
本文介绍了Brew清理错误:权限被拒绝@ unlink_internal的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在执行酿造清理"时遇到错误:
I met an error while doing "brew cleanup":
$ brew cleanup
Warning: Skipping opam: most recent version 2.0.3 not installed
Warning: Skipping python: most recent version 3.7.2_2 not installed
Warning: Skipping sqlite: most recent version 3.27.1 not installed
Error: Permission denied @ unlink_internal - /usr/local/lib/node_modules/@angular/cli/node_modules/.bin/in-install
有人知道如何解决此问题吗?
Does anyone know how to fix this?
PS:brew link node
返回一个错误,尽管我不知道它是否相关.
PS: brew link node
returns an error, though I don't know if it is related.
$ brew install node
Warning: node 11.9.0 is already installed, it's just not linked
You can use `brew link node` to link this version.
$ brew link node
Linking /usr/local/Cellar/node/11.9.0...
Error: Could not symlink include/node/common.gypi
Target /usr/local/include/node/common.gypi
already exists. You may want to remove it:
rm '/usr/local/include/node/common.gypi'
To force the link and overwrite all conflicting files:
brew link --overwrite node
To list all files that would be deleted:
brew link --overwrite --dry-run node
推荐答案
导致错误的第一个修复权限:
First fix permissions causing the error:
sudo chown -R "$(whoami)":admin /usr/local
在macOS Mojave上,chown
命令需要在特定目录上运行,例如/usr/local/lib
目录中权限问题的示例,该命令为
On macOS Mojave, the chown
command needs to be run on the specific directory, an example for the permissions issue in /usr/local/lib
directory, this command would be
sudo chown -R "$(whoami)":admin /usr/local/lib
然后按照指示将node
与--force
选项重新链接:
Then relink node
with the --force
option as directed:
brew link --overwrite node
这篇关于Brew清理错误:权限被拒绝@ unlink_internal的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文