1. 程式人生 > >Debian、Ubuntu安裝node.js

Debian、Ubuntu安裝node.js

install and command ubunt 更新 http 安裝完成 sta 查看

由於使用apt工具直接安裝node.js會出現問題,所以我們使用 n 來安裝node.js
? n 是一個node.js版本管理器

n的安裝很簡單,在命令行輸入curl -L https://git.io/n-install | bash
? n安裝時默認會安裝上好最新穩定版node.js。這樣node.js和n就一次性安裝好了

安裝完成,輸入. /root/.bashrc,更新bash配置。
然後輸入node -v,查看你的node版本。出現版本信息,恭喜安裝無誤。


以下列出一些你可能遇到的問題:

-bash: curl: command not found

apt install curl

E: Unable to locate package curl

apt-get update      //更新軟件源

`git` not found

apt install git

GNU Make not found

apt-get install build-essential

Debian、Ubuntu安裝node.js