NodeJs - Ubuntu 18.04 LTS

2018-11-03  本文已影响0人  Guoke24

Ubuntu 18.04 LTS,安装Node.js,遇到npm不成功的问题:
Depends: node-gyp (>= 0.10.9)

参考该篇问答解决问题

总结一下安装的命令:

Ubuntu Server 18.04 Node.js and npm install

sudo apt remove --purge nodejs npm
sudo apt clean
sudo apt autoclean
sudo apt install -f
sudo apt autoremove

Find the latest version at https://github.com/nodesource/distributions#debinstall Latest version 10.x now

sudo apt install curl
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install yarn

npm -version
6.1.0
nodejs -v
v10.7.0
上一篇 下一篇

猜你喜欢

热点阅读