gue*_*nam 5 installation upgrade node.js ubuntu-14.04
所以我在做apt-get升级时遇到这个错误
Setting up nodejs (0.10.30-1chl1~trusty1) ...
update-alternatives: error: alternative link /usr/bin/node is already managed by nodejs
dpkg: error processing package nodejs (--configure): subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing: nodejs
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
注意:"nodejs --version"工作,我得到一个干净的"v0.10.30",但"node --version"没有,因为没有链接.
到目前为止,我尝试过:
小智 7
其他答案没有解决我的设置问题,可能是因为我使用的是NodeSource存储库而不是官方存储库.
但我首先删除了nodejs组的所有"替代方案":
sudo update-alternatives --remove-all nodejs
Run Code Online (Sandbox Code Playgroud)
在那之后,一个sudo apt-get install nodejs刚刚工作.
我真的鼓励你使用 nvm 在你的 ubuntu 机器上安装 Node.js ( https://github.com/creationix/nvm )。这样,任何 Node.js 版本的安装都变得非常容易。
| 归档时间: |
|
| 查看次数: |
3901 次 |
| 最近记录: |