ubuntu 16.04 安装node.js 8.x

引自 https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04#how-to-install-using-a-ppa

按很多方法装都是装的v4.2.6,用一下方法终于成功安装8.11.2。

$ curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
$ sudo bash nodesource_setup.sh
$ sudo apt-get install nodejs
$ nodejs -v
v8.11.2
$ npm -v
5.6.0

为了使一些npm包能够工作(例如那些需要从源代码编译代码的包),您需要安装build-essential包:

$ sudo apt-get install build-essential

您现在有必要的工具来处理需要从源代码编译代码的npm包。

转载于:https://www.cnblogs.com/sclczk/p/9084764.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值