Debian 里安装东西一般都比较简单,使用apt-get就行,但是Debian 9源里的Nodejs版本太老了
# nodejs -v
v4.8.4上网搜了一下,可以使用nodesource提供的源来安装Nodejs 14。
先安装nodesource源
apt-get install curl
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -然后安装 Nodejs 和 npm
apt-get update
apt-get install nodejs查看版本号
# nodejs -v
v14.17.1
精选留言