未满足的依赖关系。尝试“apt --fix-broken install”

未满足的依赖关系。尝试“apt --fix-broken install”

因此,我已经从 Disco 升级到了 Eoan,到目前为止相当“有趣”,我需要重建 Grub 才能获得 GUI - 花了一段时间但完成了,我正在使用 PC。今天我遇到了多次浏览器崩溃,所以我的第一个想法是同时运行 sudo apt update sudo apt upgrade。这是一次令人失望的练习。这是更新的输出“可以升级 3 个软件包。运行‘apt list --upgradable’来查看它们。”

太酷了,我不在乎软件包是什么,只要升级它们就可以了,所以在我输入 apt upgrade 后,我在终端中看到了这个

Reading package lists... Done Building dependency tree        Reading
state information... Done You might want to run 'apt --fix-broken
install' to correct these. The following packages have unmet
dependencies:  linux-image-generic : Depends:
linux-modules-extra-5.3.0-45-generic but it is not installed E: Unmet
dependencies. Try 'apt --fix-broken install' with no packages (or
specify a solution).

这是出乎意料的,所以我运行了 apt --fix-broken install 然后瞧!

The following packages were automatically installed and are no longer
required:   chromium-browser-l10n command-not-found-data diffstat
g++-8 gir1.2-mutter-4   intltool-debian libapt-inst2.0 libapt-pkg-perl
libapt-pkg5.0   libarchive-zip-perl libasync-mergepoint-perl
libb-hooks-op-check-perl   libcapture-tiny-perl libcgi-fast-perl
libcgi-pm-perl libclass-accessor-perl   libclass-method-modifiers-perl
libclass-xsaccessor-perl libclone-perl   libcrystalhd3
libdevel-callchecker-perl libdevel-globaldestruction-perl  
libdigest-bubblebabble-perl libdouble-conversion1  
libdynaloader-functions-perl libebook-contacts-1.2-2 libecal-1.2-19  
libemail-valid-perl libexporter-tiny-perl libfcgi-perl  
libfile-find-rule-perl libfuture-perl libgle3 libgnome-desktop-3-17  
libgssdp-1.0-3 libgtkspell3-3-0 libgupnp-1.0-4 libigdgmm5  
libimport-into-perl libio-async-loop-epoll-perl libio-async-perl  
libio-pty-perl libio-string-perl libip4tc0 libip6tc0 libipc-run-perl  
libisl19 libjpeg-turbo-progs libjson-c3 liblinux-epoll-perl  
liblist-compare-perl liblist-moreutils-perl libllvm8 liblouisutdml8  
libmodule-runtime-perl libmoo-perl libmutter-4-0 libmysqlclient20  
libnet-dns-perl libnet-dns-sec-perl libnet-domain-tld-perl
libnet-ip-perl   libnumber-compare-perl libparams-classify-perl
libparse-debianchangelog-perl   libpath-tiny-perl libperlio-gzip-perl
libpoppler85 libreadonly-perl   libref-util-perl libref-util-xs-perl
libreoffice-avmedia-backend-gstreamer   librole-tiny-perl librsync1
libsereal-decoder-perl libsereal-encoder-perl   libsereal-perl
libstdc++-8-dev libstrictures-perl libstruct-dumb-perl  
libsub-exporter-progressive-perl libsub-quote-perl libtagc0  
libtest-fatal-perl libtest-refcount-perl libtext-glob-perl  
libtext-levenshtein-perl libtype-tiny-perl libtype-tiny-xs-perl  
libunicode-utf8-perl libvpx5 libx265-165 libxml-simple-perl  
libyaml-libyaml-perl lintian multiarch-support patchutils
python-fasteners   python-lockfile python-monotonic python-six t1utils
xscreensaver-data   xscreensaver-data-extra xscreensaver-gl
xscreensaver-gl-extra Use 'sudo apt autoremove' to remove them. The
following additional packages will be installed:  
linux-modules-extra-5.3.0-45-generic The following NEW packages will
be installed:   linux-modules-extra-5.3.0-45-generic 0 to upgrade, 1
to newly install, 0 to remove and 3 not to upgrade. 7 not fully
installed or removed. Need to get 0 B/38.3 MB of archives. After this
operation, 188 MB of additional disk space will be used. Do you want

是否继续?[Y/n]

当然,我输入了“Y”,接下来发生的事情如下

(Reading database ... 277005 files and directories currently
installed.) Preparing to unpack
.../linux-modules-extra-5.3.0-45-generic_5.3.0-45.37_amd64.d eb ...
Unpacking linux-modules-extra-5.3.0-45-generic (5.3.0-45.37) ...
dpkg-deb (subprocess): decompressing archive member: lzma error:
compressed data  is corrupt dpkg-deb: error: <decompress> subprocess
returned error exit status 2 dpkg: error processing archive
/var/cache/apt/archives/linux-modules-extra-5.3.0
-45-generic_5.3.0-45.37_amd64.deb (--unpack):  cannot copy extracted data for './lib/modules/5.3.0-45-generic/kernel/drivers/m
edia/dvb-frontends/cx24120.ko' to
'/lib/modules/5.3.0-45-generic/kernel/drivers/
media/dvb-frontends/cx24120.ko.dpkg-new': unexpected end of file or
stream Errors were encountered while processing: 
/var/cache/apt/archives/linux-modules-extra-5.3.0-45-generic_5.3.0-45.37_amd64.
deb E: Sub-process /usr/bin/dpkg returned an error code (1)

因此,由于某些 dpkg 问题,我似乎无法更新或升级

有什么提示或线索吗?

Check if you are using third party repositories. If so disable them, since they are a common source of problems.
Furthermore run the following command in a Terminal: apt-get install -f
Transaction failed: The package system is broken
 The following packages have unmet dependencies:

linux-image-generic: Depends: linux-modules-extra-5.3.0-45-generic but it is not installed

我没有第三方存储库

  1. 真是一片混乱!

    sudo apt install ubuntu-desktop --fix-missing [sudo] **** 的密码:正在读取软件包列表...完成正在构建依赖关系树
    正在读取状态信息...完成ubuntu-desktop 已经是最新版本 (1.440.1)。您可能需要运行“apt --fix-broken install”来更正这些问题。以下软件包具有未满足的依赖关系:linux-image-generic:依赖:linux-modules-extra-5.3.0-45-generic 但不会安装 E:未满足的依赖关系。尝试在不使用软件包的情况下执行“apt --fix-broken install”(或指定解决方案)

  1. sudo apt 安装 linux-modules-extra-5.3.0-45-generic

我们回到

正在读取软件包列表... 完成 正在构建依赖关系树 正在读取状态信息... 完成 以下软件包已自动安装,不再需要: chromium-browser-l10n command-not-found-data diffstat g++-8 gir1.2-mutter-4
intltool-debian libapt-inst2.0 libapt-pkg-perl libapt-pkg5.0
libarchive-zip-perl libasync-mergepoint-perl libb-hooks-op-check-perl libcapture-tiny-perl libcgi-fast-perl libcgi-pm-perl libclass-accessor-perl libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl libcrystalhd3 libdevel-callchecker-perl libdevel-globaldestruction-perl
libdigest-bubblebabble-perl libdouble-conversion1
libdynaloader-functions-perl libebook-contacts-1.2-2 libecal-1.2-19
libemail-valid-perl libexporter-tiny-perl libfcgi-perl
libfile-find-rule-perl libfuture-perl libgle3 libgnome-desktop-3-17
libgssdp-1.0-3 libgtkspell3-3-0 libgupnp-1.0-4 libigdgmm5
libimport-into-perl libio-async-loop-epoll-perl libio-async-perl
libio-pty-perl libio-string-perl libip4tc0 libip6tc0 libipc-run-perl
libisl19 libjpeg-turbo-progs libjson-c3 liblinux-epoll-perl
liblist-compare-perl liblist-moreutils-perl libllvm8 liblouisutdml8
libmodule-runtime-perl libmoo-perl libmutter-4-0 libmysqlclient20
libnet-dns-perl libnet-dns-sec-perl libnet-domain-tld-perl libnet-ip-perl libnumber-compare-perl libparams-classify-perl libparse-debianchangelog-perl libpath-tiny-perl libperlio-gzip-perl libpoppler85 libreadonly-perl libref-util-perl libref-util-xs-perl libreoffice-avmedia-backend-gstreamer librole-tiny-perl librsync1 libsereal-decoder-perl libsereal-encoder-perl libsereal-perl libstdc++-8-dev libstrictures-perl libstruct-dumb-perl
libsub-exporter-progressive-perl libsub-quote-perl libtagc0
libtest-fatal-perl libtest-refcount-perl libtext-glob-perl
libtext-levenshtein-perl libtype-tiny-perl libtype-tiny-xs-perl
libunicode-utf8-perl libvpx5 libx265-165 libxml-simple-perl
libyaml-libyaml-perl lintian multiarch-support patchutils python-fasteners python-lockfile python-monotonic python-six t1utils xscreensaver-data xscreensaver-data-extra xscreensaver-gl xscreensaver-gl-extra 使用“sudo apt autoremove”将其删除。将安装以下新软件包:
linux-modules-extra-5.3.0-45-generic 0 个要升级,1 个要新安装,0 个要删除,3 个不要升级。7 个未完全安装或删除。需要获取 0 B/38.3 MB 的档案。此操作后,将使用 188 MB 的额外磁盘空间。 (正在读取数据库......当前安装了 277005 个文件和目录。)准备解压....../linux-modules-extra-5.3.0-45-generic_5.3.0-45.37_amd64.de eb......正在解压 linux-modules-extra-5.3.0-45-generic(5.3.0-45.37)......dpkg-deb(子进程):正在解压存档成员:lzma 错误:压缩数据已损坏dpkg-deb:错误:子进程返回错误退出状态 2dpkg:错误处理存档/var/cache/apt/archives/linux-modules-extra-5.3.0-45-generic_5.3.0-45.37_amd64.deb(--unpack):无法复制'./lib/modules/5.3.0-45-generic/kernel/drivers/m edia/dvb-frontends/cx24120.ko' 到 '/lib/modules/5.3.0-45-generic/kernel/drivers/media/dvb-frontends/cx24120.ko.dpkg-new':文件或流意外结束 处理时遇到错误:/var/cache/apt/archives/linux-modules-extra-5.3.0-45-generic_5.3.0-45.37_amd64.deb E:子进程 /usr/bin/dpkg 返回错误代码 (1)

答案1

呃……真是一团糟!这里有一个解决办法:例如,如果您使用的是 kubuntu,请尝试sudo apt install kubuntu-desktop --fix-missing;如果您使用的是 ubuntu,请尝试sudo apt install ubuntu-desktop --fix-missing等等。如果不起作用,请尝试sudo apt install linux-modules-extra-5.3.0-45-generic。如果这些都不起作用,请告诉我您遇到了什么错误。

答案2

您的模块linux-modules-extra不再可从 Eoan 获取。这意味着需要从头开始设置内核。我提出两种解决方案:

  1. 备份所有数据并重新安装。这会使用可用的模块构建内核,这是更快的解决方案。
  2. 深入挖掘并找到受影响的设备。通常是网络设备。我以前也遇到过类似的 railteck wi-fi 调制解调器问题。如果选择第二种方法,则需要大量时间。

相关内容