ubuntu下nodejs源码安装

  1.从github选择下载自己要安装的nodejs版本,https://github.com/nodejs/node/releases,我下载的版本是node-9.11.2.tar.gz

  2.解压node-9.11.2.tar.gz到/opt/node-9.11.2目录

  3.给/opt/node-9.11.2目录755的权限

  4./configure

  5.sudo make

  6.sudo make install

原文地址:https://www.cnblogs.com/senlinyang/p/9283551.html