[英]Problems installing node and npm
I am trying to run the command我正在尝试运行命令
brew install node
and getting the warning:并收到警告:
node 12.12.0 is already installed, it's just not linked
You can use `brew link node` to link this version.
brew link node
, I get the errorbrew link node
时,出现错误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
rm '/usr/local/include/node/common.gypi'
and it asksrm '/usr/local/include/node/common.gypi'
并询问override rw-r--r-- root/wheel for /usr/local/include/node/common.gypi?
it says它说
rm: /usr/local/include/node/common.gypi: Permission denied
How do I fix the problem with the installation?如何解决安装问题?
Thanks谢谢
I assume that you are using Mac.我假设您使用的是 Mac。 try
尝试
sudo rm: /usr/local/include/node/common.gypi
Also add node PATH to your environment variables.还将节点 PATH 添加到您的环境变量中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.