ubuntu安装node和npm

一 node的安装

通过命令行sudo apt-get install nodejs安装后,执行node -v

出现

The program 'node' can be found in the following packages:
 * node
 * nodejs-legacy

发现只有再执行sudo apt-get install nodejs-legacy安装,再执行node -v

出现

v0.10.25

二 npm的安装

之前用了163的源,通过命令行sudo apt-get install npm,会报错,换了debian.ustc.edu.cn的源后,此问题解决

posted on 2017-03-07 15:31  猫来喵去  阅读(123)  评论(0编辑  收藏  举报

导航