Brew cleanup Error: Permission denied @ unlink_internal
Brew cleanup Error: Permission denied @ unlink_internal
我在执行 "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
有人知道如何解决这个问题吗?
PS: brew link node
returns 一个错误,虽然我不知道它是否相关。
$ 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
首先修复导致错误的权限:
sudo chown -R "$(whoami)":admin /usr/local
在 macOS Mojave 上,chown
命令需要在特定目录上 运行,例如 /usr/local/lib
目录中的权限问题,此命令为
sudo chown -R "$(whoami)":admin /usr/local/lib
然后按照指示使用 --force
选项重新链接 node
:
brew link --overwrite node
这对我有用:
brew unlink node && brew link node
我在执行 "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
有人知道如何解决这个问题吗?
PS: brew link node
returns 一个错误,虽然我不知道它是否相关。
$ 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
首先修复导致错误的权限:
sudo chown -R "$(whoami)":admin /usr/local
在 macOS Mojave 上,chown
命令需要在特定目录上 运行,例如 /usr/local/lib
目录中的权限问题,此命令为
sudo chown -R "$(whoami)":admin /usr/local/lib
然后按照指示使用 --force
选项重新链接 node
:
brew link --overwrite node
这对我有用:
brew unlink node && brew link node