1. sudo apt-get install nodejs sudo apt-get install npm
print the version:
node -v
npm -v
2.
npm install -g hexo-cli
3. update nodejs version:
sudo npm install n -g
sudo n stable
sudo npm install -g hexo-cli
wyk@ubuntu:~$ hexo -v
hexo-cli: 4.2.0
os: Linux 5.4.0-60-generic linux x64
node: 14.15.5
v8: 8.4.371.19-node.18
uv: 1.40.0
zlib: 1.2.11
brotli: 1.0.9
ares: 1.16.1
modules: 83
nghttp2: 1.41.0
napi: 7
llhttp: 2.1.3
openssl: 1.1.1i
cldr: 37.0
icu: 67.1
tz: 2020a
unicode: 13.0
wyk@ubuntu:~/github$
reference: