我正在尝试将节点的版本更新为最新的稳定版。
使用此资源,我能够:
sudo npm install n -g
但是当我尝试
sudo npm n stable
我得到:
sudo: n: command not found
如果我运行n stable
,则显示命令:
n stable
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
install : node-v0.12.2
mkdir : /usr/local/n/versions/node/0.12.2
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
Error: sudo required
ls /usr/local/bin/n