我無法再使用 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
不會起作用。