【问题标题】:Problems when installing python3-dev安装python3-dev时的问题
【发布时间】:2019-03-24 01:12:09
【问题描述】:

这个问题折磨了我2天,没有python3-dev我无法安装任何模块,有人能告诉我怎么解决这个问题吗?

The following packages have unmet dependencies:
     python3-dev : Depends: python3 (= 3.5.1-3) but 3.5.1-4 is to be installed
                   Depends: libpython3-dev (= 3.5.1-3) but it is not going to be installed
                   Depends: python3.5-dev (>= 3.5.1-2~) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

【问题讨论】:

  • 你试过sudo apt-get install -f吗?
  • apt policy python3 python3-dev 输出什么?
  • 这是apt ubuntu/debian 包管理器处于不一致状态的问题。该问题属于 askubuntu stackexchange 网站。 How do I resolve The following packages have unmet dependencies
  • 在尝试apt remove python3 之后首先运行apt update,现在尝试安装python3-dev

标签: python linux python-3.x ubuntu pip


【解决方案1】:

我在 Ubuntu Desktop 20.04 上为自己找到了这样的解决方案:

转到“软件和更新”应用程序 -> 然后将“下载自”服务器更改为“主服务器”。在此关闭并转到终端之后。然后 sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove && sudo apt install python3-dev -y

【讨论】:

    【解决方案2】:

    您可以尝试安装包 libpython3-dev 而不是安装包 python3-dev。

    我在这里回答了一个类似的问题: https://superuser.com/a/1407453/1000196

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-11
      • 2021-10-17
      相关资源
      最近更新 更多