首页 > Web开发 > 详细

ubuntu16.04 安装node.js

时间:2018-12-26 11:31:19      阅读:120      评论:0      收藏:0      [点我收藏+]
1、更新ubuntu软件源
sudo apt-get update
sudo apt-get install -y python-software-properties software-properties-common
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
2、安装nodejs
sudo apt-get install nodejs
sudo apt install nodejs-legacy
sudo apt install npm
3、更新npm的包镜像源,方便快速下载
sudo npm config set registry https://registry.npm.taobao.org
sudo npm config list
4、全局安装n管理器(用于管理nodejs版本)
sudo npm install n -g
5、安装最新的nodejs(stable版本)
sudo n stable
6、升级npm为最新版本
sudo npm install npm@latest -g
7、查看版本
sudo node -v
sudo npm -v

ubuntu16.04 安装node.js

原文:http://blog.51cto.com/xiaok007/2335337

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!