美文网首页
NodeJs - Ubuntu 18.04 LTS

NodeJs - Ubuntu 18.04 LTS

作者: Guoke24 | 来源:发表于2018-11-03 13:23 被阅读0次

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

相关文章

网友评论

      本文标题:NodeJs - Ubuntu 18.04 LTS

      本文链接:https://www.haomeiwen.com/subject/gxekxqtx.html