简体   繁体   English

"我在更新节点和 npm 时遇到问题"

[英]I am having trouble updating node and npm

I'm currently using Ubuntu 18.04.6 LTS and I want to upgrade nodejs to version 16 but, unable to.我目前正在使用 Ubuntu 18.04.6 LTS,我想将 nodejs 升级到版本 16,但是无法升级。 I have almost spent 4 hours trying to resolve this and stackoverflow is my last option.我几乎花了 4 个小时试图解决这个问题,stackoverflow 是我最后的选择。

Problems<\/strong>问题<\/strong>

  1. Sudo apt-get update gives: error about some docker repo 404 Not Found [IP: 13.35.169.116 443]<\/a> Sudo apt-get update 给出:关于一些 docker repo 404 Not Found [IP: 13.35.169.116 443]<\/a>的错误

    <\/li>

  2. I followed this tutorial<\/a> and it did not help.我按照本教程<\/a>进行操作,但没有帮助。

    <\/li>

  3. Running node --version<\/code> gives v0.10.31<\/strong>运行node --version<\/code>给出v0.10.31<\/strong>

    <\/li>

  4. Running npm --version<\/code> gives This<\/a>运行npm --version<\/code>给出了这个<\/a>

    <\/li><\/ol>"

Node is not up to date in ubuntu's ppa. Node 在 ubuntu 的 ppa 中不是最新的。 I would recommend just using nvm ( node version manager ) to install the version you need: https:\/\/github.com\/nvm-sh\/nvm\/blob\/master\/README.md<\/a>我建议只使用 nvm(节点版本管理器)来安装您需要的版本: https<\/a> :\/\/github.com\/nvm-sh\/nvm\/blob\/master\/README.md

"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM