我尝试通过多种方式进行更新,但一直遇到相同的显示,基本上说有 6 个软件包未升级。(您可以在我的个人资料中看到整个问题)经过一些故障排除后,我开始尝试单独安装软件包,但我还不太懂技术,但想知道我使用的命令是否正确使用。
dcg@dcg-IdeaPad-5-15ITL05:~$ sudo apt-get --only-upgrade install jammy-updates 12ubuntu4.2 amd64 [upgradable from: 12ubuntu4.1]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package jammy-updates
E: Unable to locate package 12ubuntu4.2
E: Couldn't find any package by glob '12ubuntu4.2'
E: Couldn't find any package by regex '12ubuntu4.2'
E: Unable to locate package amd64
E: Unable to locate package [upgradable
E: Couldn't find any package by glob '[upgradable'
E: Regex compilation error - Unmatched [, [^, [:, [., or [=
E: Couldn't find any package by regex '[upgradable'
E: Unable to locate package from:
E: Unable to locate package 12ubuntu4.1]
E: Couldn't find any package by glob '12ubuntu4.1]'
E: Couldn't find any package by regex '12ubuntu4.1]'
你能告诉我它是否被正确使用吗?(我对此表示怀疑,因为它找不到任何包......)
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
答案1
安装需要更新的软件包的唯一正确方法是通过,sudo apt update && sudo apt full-upgrade
因为任何具有新依赖项的软件包都会被拉入这些新的依赖项和更新。
jammy-updates
字符串中 没有软件包或任何正则表达式模式匹配项,无法指定特定版本。您的消息只是说有 6 个软件包需要更新,而不是您需要更新/升级的软件包。apt
已经内置了执行升级的命令,您只需按照我上面指定的方式指示它即可。