我安装了节点,但是它没有链接
我尝试过sudo chown -R $(whoami) $(brew --prefix)
,但得到了
chown: /usr/local: Operation not permitted
我卸载了该节点并重新安装,但错误仍然存在,实际上,如果我尝试使用node --version
返回的版本进行验证
-bash: node: command not found
在安装过程中,我遇到了这些错误enter code here
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 tripnode
To list all files that would be deleted:
brew link --overwrite --dry-run tripnode
但是我无法删除它或将其覆盖,而我在同一进程中遇到此错误
Permission denied @ dir_s_mkdir -/usr/local/lib/node_modules/npm/node_modules/agent-base
我也使用brew upgrade
,并且在升级过程中遇到了该错误
Error: An exception occurred within a child process: Errno::EACCES: Permission denied @ dir_s_mkdir - /usr/local/Cellar/readline/8.0.4
最后,如果我使用brew doctor
并且收到了警告
You have unlinked kegs in your Cellar.
有人可以帮我吗?请