我刚刚在我的 Linux 服务器上运行了一些安装,其中两个遇到了问题(一个我修好了,另一个坏了)。
我越来越
sudo apt upgrade 6.7s Thu 12 Nov 2020 11:37:03 PM UTC
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-generic : Depends: linux-headers-generic (= 5.4.0.52.55) but 5.4.0.53.56 is installed
linux-headers-5.4.0-53-generic : Depends: linux-headers-5.4.0-53 but it is not installed
E: Unmet dependencies. Try "apt --fix-broken install" with no packages (or specify a solution).
当我尝试运行--fix-broken时
sudo apt-get -f install Thu 12 Nov 2020 11:41:19 PM UTC
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
linux-generic linux-headers-5.4.0-53 linux-image-generic linux-modules-extra-5.4.0-53-generic
The following NEW packages will be installed:
linux-headers-5.4.0-53 linux-modules-extra-5.4.0-53-generic
The following packages will be upgraded:
linux-generic linux-image-generic
2 upgraded, 2 newly installed, 0 to remove and 11 not upgraded.
4 not fully installed or removed.
Need to get 0 B/49.6 MB of archives.
After this operation, 261 MB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 126536 files and directories currently installed.)
Preparing to unpack .../linux-headers-5.4.0-53_5.4.0-53.59_all.deb ...
Unpacking linux-headers-5.4.0-53 (5.4.0-53.59) ...
dpkg: error processing archive /var/cache/apt/archives/linux-headers-5.4.0-53_5.4.0-53.59_all.deb (--unpack):
unable to clean up mess surrounding './usr/share/doc/linux-headers-5.4.0-53' before installing another version: Bad message
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../linux-modules-extra-5.4.0-53-generic_5.4.0-53.59_amd64.deb ...
Unpacking linux-modules-extra-5.4.0-53-generic (5.4.0-53.59) ...
dpkg: error processing archive /var/cache/apt/archives/linux-modules-extra-5.4.0-53-generic_5.4.0-53.59_amd64.deb (--unpack):
unable to clean up mess surrounding './usr/share/doc/linux-modules-extra-5.4.0-53-generic' before installing another version: Bad message
Preparing to unpack .../linux-generic_5.4.0.53.56_amd64.deb ...
Unpacking linux-generic (5.4.0.53.56) over (5.4.0.52.55) ...
dpkg: error processing archive /var/cache/apt/archives/linux-generic_5.4.0.53.56_amd64.deb (--unpack):
failed to stat (dereference) existing symlink '/usr/share/doc/linux-generic/changelog.gz': Bad message
Preparing to unpack .../linux-image-generic_5.4.0.53.56_amd64.deb ...
Unpacking linux-image-generic (5.4.0.53.56) over (5.4.0.52.55) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-generic_5.4.0.53.56_amd64.deb (--unpack):
unable to stat './usr/share/doc/linux-image-generic' (which I was about to install): Bad message
No apport report written because MaxReports is reached already
Errors were encountered while processing:
/var/cache/apt/archives/linux-headers-5.4.0-53_5.4.0-53.59_all.deb
/var/cache/apt/archives/linux-modules-extra-5.4.0-53-generic_5.4.0-53.59_amd64.deb
/var/cache/apt/archives/linux-generic_5.4.0.53.56_amd64.deb
/var/cache/apt/archives/linux-image-generic_5.4.0.53.56_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)'
现在我无法用 apt 对这台机器做任何其他事情,否则它就会爆炸。
请问我在这里做什么?
答案1
事实证明,损坏的磁盘映像才是造成损害的原因。
在图像上运行 fsck.ext4,现在一切正常。