04.1 与 GRUB 双重启动。我正在安装 openFOAM,然后尝试使用常规方法升级软件包sudo apt-get upgrade
,但标准软件包一直出错。这是输出sudo apt-get update
:
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [111 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-security InRelease [107 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [229 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [202 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [12.3 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:10 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1,768 B]
Get:11 http://archive.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [24.3 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [55.6 kB]
Hit:3 https://sourceforge.net/projects/openfoam/files/repos/deb focal InRelease
Fetched 844 kB in 3s (293 kB/s)
Reading package lists... Done
下面是输出sudo apt-get upgrade
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
10 not fully installed or removed.
Need to get 0 B/3,441 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: dependency problems prevent configuration of mutter:
mutter depends on adwaita-icon-theme; however:
Package adwaita-icon-theme is not installed.
dpkg: error processing package mutter (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-shell:
gnome-shell depends on mutter (>= 3.36.0); however:
Package mutter is not configured yet.
dpkg: error processing package gnome-shell (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of ibus:
ibus depends on adwaita-icon-theme; however:
Package adwaita-icon-theme is not installed.
dpkg: error processing package ibus (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gdm3:
gdm3 depends on gnome-shell (>= 3.19.92); however:
Package gnome-shell is not configured yet.
dpkg: error processing package gdm3 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libmutter-6-0:amd64:
libmutter-6-0:amd64 depends on adwaita-icon-theme; however:
Package adwaita-icon-theme is not installed.
dpkg: error processing package libmutter-6-0:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-desktop:
ubuntu-desktop depends on gdm3; however:
Package gdm3 is not configured yet.
ubuntu-desktop depends on gnome-shell; however:
Package gnome-sheNo apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
ll is not configured yet.
dpkg: error processing package ubuntu-desktop (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gir1.2-mutter-6:amd64:
gir1.2-mutter-6:amd64 depends on libmutter-6-0 (= 3.36.6-1ubuntu0.20.04.2); however:
Package libmutter-6-0:amd64 is not configured yet.
dpkg: error processing package gir1.2-mutter-6:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-shell-extension-desktop-icons:
gnome-shell-extension-desktop-icons depends on gnome-shell (>= 3.33); however:
Package gnome-shell is not configured yet.
dpkg: error processing package gnome-shell-extension-desktop-icons (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-desktop-minimal:
ubuntu-desktop-minimal depends on gdm3; however:
Package gdm3 is not configured yet.
ubuntu-desktop-minimal depends on gnome-shell; however:
Package gnome-shell is not configured yet.
ubuntu-desktop-minimal depends on gnome-shell-extension-desktop-icons; however:
Package gnome-shell-extension-desktop-icons is not configured yet.
dpkg: error processing package ubuntu-desktop-minimal (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent processing triggers for libgtk-3-0:amd64:
libgtk-3-0:amd64 depends on adwaita-icon-theme; however:
Package adwaita-icon-theme is not installed.
dpkg: error processing package libgtk-3-0:amd64 (--configure):
dependency problems - leaving triggers unprocessed
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent processing triggers for libgtk2.0-0:amd64:
libgtk2.0-0:amd64 depends on adwaita-icon-theme | gnome-icon-theme; however:
Package adwaita-icon-theme is not installed.
Package gnome-icon-theme is not installed.
dpkg: error processing package libgtk2.0-0:amd64 (--configure):
dependency problems - leaving triggers unprocessed
No apport report written because MaxReports is reached already
Errors were encountered while processing:
mutter
gnome-shell
ibus
gdm3
libmutter-6-0:amd64
ubuntu-desktop
gir1.2-mutter-6:amd64
gnome-shell-extension-desktop-icons
ubuntu-desktop-minimal
libgtk-3-0:amd64
libgtk2.0-0:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试去追随本教程并分别删除每个包并重新安装它们,但我无法删除它们,因为它们是其他包依赖的。它还说没有adwaita-icon-theme
安装,但当我尝试安装它时,它说它已经存在。最好的攻击方法是什么?我没有很多数据,所以我可以擦除驱动器并重新安装 ubuntu,如果这样更简单的话。谢谢。
答案1
我遇到了类似的错误,问题出在 ubuntu 的代码版本上。请检查您的sources.list
文件。所有文件都应该具有相同的代码版本。
运行此命令来获取版本:
lsb_release -c
输出应该是这样的:
Codename: focal
您将看到您的代码而不是焦点
接下来使用此命令查看所有 deb 条目:
find /etc/apt -iname '*.list' -exec awk '$1 ~ /^deb/ {print}' {} \;
并检查代码是否lsb_release
与您的 deb 条目相同。
注意:有些软件存储库不使用代码,例如 opera 浏览器,它使用stable
代码。