我无法再使用 apt-get 安装/清除/重新安装或执行任何操作。例如,当我执行以下操作时:
sudo apt-get autoremove
我得到:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 41 not upgraded.
2 not fully installed or removed.
Need to get 0 B/12.3 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package openjdk-11-jre-headless:amd64 (--configure):
unable to check existence of '/var/lib/dpkg/info/ca-certificates-java.postinst': Structure needs cleaning
dpkg: dependency problems prevent configuration of ca-certificates-java:
ca-certificates-java depends on openjdk-11-jre-headless | java8-runtime-headless; however:
Package openjdk-11-jre-headless:amd64 is not configured yet.
Package java8-runtime-headless is not installed.
Package openjdk-8-jre-headless:amd64 which provides java8-runtime-headless is not installed.
Package openjdk-11-jre-headless:amd64 which provides java8-runtime-headless is not configured yet.
dpkg: error processing package ca-certificates-java (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
openjdk-11-jre-headless:amd64
ca-certificates-java
E: Sub-process /usr/bin/dpkg returned an error code (1)
重新安装也不起作用:
root@xubuntu:/var/cache/apt/archives# sudo apt-get install --reinstall oracle-java11-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
gsfonts-x11 oracle-java11-set-default
Suggested packages:
binfmt-support visualvm ttf-baekmuk | ttf-unfonts | ttf-unfonts-core ttf-kochi-gothic | ttf-sazanami-gothic
ttf-kochi-mincho | ttf-sazanami-mincho ttf-arphic-uming
The following packages will be REMOVED:
openjdk-11-jre-headless
The following NEW packages will be installed:
gsfonts-x11 oracle-java11-installer oracle-java11-set-default
0 upgraded, 3 newly installed, 1 to remove and 4 not upgraded.
2 not fully installed or removed.
Need to get 45.4 kB/57.6 kB of archives.
After this operation, 169 MB disk space will be freed.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu cosmic/universe amd64 gsfonts-x11 all 0.26 [7140 B]
Get:2 http://ppa.launchpad.net/linuxuprising/java/ubuntu cosmic/main amd64 oracle-java11-installer amd64 11.0.2-2~linuxuprising1 [35.1 kB]
Get:3 http://ppa.launchpad.net/linuxuprising/java/ubuntu cosmic/main amd64 oracle-java11-set-default amd64 11.0.2-2~linuxuprising1 [3116 B]
Fetched 45.4 kB in 0s (306 kB/s)
Preconfiguring packages ...
dpkg: error processing package openjdk-11-jre-headless:amd64 (--remove):
unable to check existence of '/var/lib/dpkg/info/ca-certificates-java.postinst': Structure needs cleaning
Errors were encountered while processing:
openjdk-11-jre-headless:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
正在做:
sudo apt-get purge openjdk-11-jre-headless
或者
sudo apt-get purge ca-certificate-java
也不起作用,并在处理 ca-certificates-java 时导致类似问题。 有办法解决我的情况吗?
编辑
受影响的设备是 casper-rw fs
sdd 28.7G
├─sdd1 ntfs 28.7G /isodevice UUI
└─sdd4 ext2 12.2G casper-rw
因此fsck
不起作用。