我有一个Ubuntu20.04VPS。在此服务器上,当我运行sudo apt-get update && sudo apt-get upgrade
时,它显示有3个可升级的包,但当我运行升级命令或强制升级时,没有升级或安装。当我检查sudo apt list --upgradable
时,它什么也没有显示。
这是什么原因?我该怎么解决这个问题?
root@server:~# du -sh /var/cache/apt/archives
40K /var/cache/apt/archives
root@server:~# sudo apt-get clean
root@server:~# sudo apt-get update && sudo apt-get upgrade
Hit:1 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/xUbuntu_20.04 InRelease [1,537 B]
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:7 http://archive.ubuntu.com/ubuntu focal-security InRelease
Hit:8 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Hit:9 http://ppa.launchpad.net/wordops/nginx-wo/ubuntu focal InRelease
Get:10 http://mariadb.mirrors.ovh.net/MariaDB/repo/10.5/ubuntu focal InRelease [7,767 B]
Fetched 9,304 B in 1s (10.8 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
root@server:~# sudo apt list --upgradable
Listing... Done
root@server:~#
发布于 2022-06-23 16:43:59
来自男子汉:
-u,--显示升级的显示升级包;打印要升级的所有包的列表.配置项目:APT::Get::Show升级。
因此,尝试运行以下两种方法:
sudo apt upgrade -u
也可以在以下两个组中指定相同的-u
选项:
sudo apt upgrade --show-upgraded
或者:
sudo apt upgrade -o APT::Get::Show-Upgraded=true
同样,应该提供比sudo apt upgrade
或sudo apt list --upgradable
更多的信息,其中应该包括这些3 not upgraded.
包的名称,这样您就可以通过以下方式了解更多信息:
dpkg -l package-name
并请参阅APT的详细响应输出:
sudo apt install package-name
这三个包很可能是具有不满意依赖项的包或具有未指定版本号的包。
它们的安装还可能需要删除一些已安装的软件包,在这种情况下,您可以告诉apt
对这些软件包进行修改和升级,这将导致删除其他一些冲突的包,例如:
sudo apt full-upgrade
来自男子汉:
完全升级(apt(8))完全升级执行升级功能,但如果需要升级整个系统,将删除当前安装的软件包。
如果您想知道为什么我交替引用man apt-get
和man apt
,它们不是一样的吗?然后,请参阅我在这里的回答的解释。
https://askubuntu.com/questions/1415339
复制相似问题