AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1488536
Accepted
Artur Meinild
Artur Meinild
Asked: 2023-10-10 17:07:36 +0800 CST2023-10-10 17:07:36 +0800 CST 2023-10-10 17:07:36 +0800 CST

Volian Scar 仓库想要更新 python3-anyio,但这会带来依赖问题

  • 772

我使用的是 Ubuntu 22.04.3 服务器。我已经nala使用Volian Scar repo安装了。最近,该存储库包含了许多更新的 Python 3 软件包,包括python3-anyio.

但是,这个特定的包不会升级:

$ sudo apt full-upgrade
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  python3-mdurl
The following packages have been kept back:
  python3-anyio
The following packages will be upgraded:
  python3-click python3-httpcore python3-markdown-it python3-pygments python3-rich python3-typer python3-typing-extensions
7 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
...

如果我尝试强制安装python3-anyio,我会得到确切的原因:

$ sudo apt install --reinstall --dry-run python3-anyio 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-anyio : Depends: python3-exceptiongroup but it is not installable or
                          python3 (> 3.11) but 3.10.6-1~22.04 is to be installed
E: Unable to correct problems, you have held broken packages.

现在很明显,这个更新的包需要 Python 3“异常组”,它们要么包含在 Python 3.11 中(Ubuntu 22.04 使用 Python 3.10),要么包含在向后移植的包中python3-exceptiongroup。

在Ubuntu 软件包存档上搜索此软件包显示此软件包是 Universe 存储库的一部分,但仅适用于 Ubuntu 23.04 (Lunar) 或 23.10 (Mantic)。

当我仍然想升级我的软件包时,我必须采取哪些选项来避免这种情况下的依赖性问题?

仅供参考,这已被报告为Volian 的问题。我认为该软件包python3-exceptiongroup将来应该添加到 Volian 存储库中。

唉,python3-exceptiongroup已经添加到 Volian Scar 存储库中了,所以现在这个依赖错误不再出现了。不过,本问答中的方法可以用于其他类似情况。

apt
  • 1 1 个回答
  • 43 Views

1 个回答

  • Voted
  1. Best Answer
    Artur Meinild
    2023-10-10T17:07:36+08:002023-10-10T17:07:36+08:00

    一般来说,您在这里有两个选择:

    1. 保留该软件包python3-anyio(因此该特定软件包不会升级),或者
    2. python3-exceptiongroup手动安装。

    1. 握住包裹python3-anyio

    运行以下命令来阻止包python3-anyio:

    sudo apt-mark hold python3-anyio
    

    查看持有的包裹:

    apt-mark showhold
    

    现在,当您运行升级命令时,python3-anyio将始终保持当前版本。

    如果您稍后希望升级该软件包,请使用以下命令取消保留:

    sudo apt-mark unhold python3-anyio
    

    2.python3-exceptiongroup手动安装

    此方法要求您手动下载该python3-exceptiongroup包的副本并安装它。在这种情况下,我会选择直接从 Debian Sid 存储库下载最新版本。(由于这是 Python 3 的附加包,我想这里出现另一个依赖问题的风险可以忽略不计。)

    wget http://ftp.de.debian.org/debian/pool/main/p/python-exceptiongroup/python3-exceptiongroup_1.1.3-1_all.deb
    

    然后安装它:

    sudo apt install ./python3-exceptiongroup_1.1.3-1_all.deb
    

    现在python3-anyio已经满足了它的依赖关系,通过运行可以明显看出:

    $ sudo apt install --reinstall --dry-run python3-anyio 
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following packages will be upgraded:
      python3-anyio
    1 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
    ...
    

    现在您终于可以运行完整的升级命令,而不会阻止任何软件包:

    $ sudo apt full-upgrade
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Calculating upgrade... Done
    The following NEW packages will be installed:
      python3-mdurl
    The following packages will be upgraded:
      python3-anyio python3-click python3-httpcore python3-markdown-it python3-pygments python3-rich python3-typer python3-typing-extensions
    8 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    ...
    
    • 1

相关问题

  • 如何编写 shell 脚本来安装应用程序列表?

  • 如何查看存档中可用的软件包的所有版本?

  • 是否可以说出我安装的哪些软件包不在原版安装中?

  • 如何删除 PPA?

  • 使用 apt-get upgrade 时如何强制安装内核更新?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve