root@sotiris-X556UQK:~# sudo apt-get clean && sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up oracle-java11-installer-local (11.0.4-1~linuxuprising1) ...
Before installing this package,
please download the Oracle JDK 11 .tar.gz file
with the same version as this package (version 11.0.4),
and place it in /var/cache/oracle-jdk11-installer-local,
E.g.:
sudo mkdir -p /var/cache/oracle-jdk11-installer-local
sudo cp jdk-11.0.4_linux-x64_bin.tar.gz /var/cache/oracle-jdk11-installer-local/
sha256sum mismatch jdk-11.0.4_linux-x64_bin.tar.gz
Oracle JDK 11 is NOT installed.
dpkg: error processing package oracle-java11-installer-local (--configure):
installed oracle-java11-installer-local package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
oracle-java11-installer-local
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
运行以下命令:
sudo rm -rf /var/cache/oracle-jdk11-installer-local
sudo rm /var/lib/dpkg/info/oracle*
sudo apt purge oracle-java11-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt autoremove
答案2
我使用文件管理器(Nautilus)进入该目录/var/cache/oracle-jdk11-installer-local
,确认它在那里,然后打开终端并输入:
sudo rm -r /var/cache/oracle-jdk11-installer-local
这似乎解决了问题。
答案3
从命令行使用 apt
只需使用命令
sudo apt-get remove package_name
如果您还想删除用户数据和配置文件 1
sudo apt-get purge package_name
使用 --auto-remove 参数也将删除软件包依赖项。