gpt4 book ai didi

node.js - 在 Ubuntu 20.04 上安装 Node js 时出现 python2 错误

转载 作者:行者123 更新时间:2023-12-04 18:44:04 24 4
gpt4 key购买 nike

我已经更新到新的 Ubuntu 20.04LTS 版本,我所有的 Node 安装都已经消失了。因此,要安装 Node ,我尝试了以下 2 种方法:

1.sudo apt更新

sudo apt install nodejs npm

  • curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

  • sudo apt install nodejs

    安装 nodejs 时出现错误: nodejs : Depends: python2-minimal 但它不可安装。无法纠正问题,您持有损坏的包裹。

    screenshot

    最佳答案

    你需要安装python2。 Ubuntu 20 中的步骤

  • sudo add-apt-repository universe
  • sudo apt-get update
  • sudo apt-get install python2这将成功安装 python2。现在您可以继续正常的 nodejs 安装
  • 关于node.js - 在 Ubuntu 20.04 上安装 Node js 时出现 python2 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61797786/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com