我使用的是 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 存储库中了,所以现在这个依赖错误不再出现了。不过,本问答中的方法可以用于其他类似情况。