sudo 运行 npm或node时,出现找不到命令的情况,运行下面这些命令,
sudo ln -s /usr/local/bin/node /usr/bin/node
sudo ln -s /usr/local/lib/node /usr/lib/node
sudo ln -s /usr/local/bin/npm /usr/bin/npm
sudo ln -s /usr/local/bin/node-waf /usr/bin/node-waf
原文在这边,
https://ask.fedoraproject.org/en/question/23300/npm-command-as-root-user-not-found
时间: 2024-11-07 10:07:14