我已经有一段时间没有使用我的 Ubuntu 安装,我刚刚打开它,当我尝试安装最新一轮更新时出现这个奇怪的错误:
无法解析软件包依赖关系
This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time.
Transaction failed: Package dependencies cannot be resolved
The following packages have unmet dependencies:
grub-efi-amd64-signed: Depends: grub2-common (>= 2.02~beta2-36ubuntu3.31) but 2.04-1ubuntu26.11 is to be installed
我有点难以理解。我应该grub2-common
手动安装吗?因为那也行不通:
(base) ####@#####science-machine:~$ sudo apt-get install -y grub2-common.
[sudo] password for ####:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package grub2-common.
E: Couldn't find any package by glob 'grub2-common.'
E: Couldn't find any package by regex 'grub2-common.'
以下是需要安装的更新:
我该怎么办?我是否应该忘掉它并且永远不再安装有问题的软件包?
谢谢。
答案1
尝试运行:
sudo apt update && sudo apt autoremove && sudo apt --fix-broken install && sudo apt upgrade
这将尝试:
- 更新软件包列表
- 自动删除不必要的包
- 修复所有损坏的安装和软件包
- 升级所有可以升级的软件包