Meu problema:
Errors were encountered while processing:
jdk1.8.0-101
E: Sub-process /usr/bin/dpkg returned an error code (1)
Eu enfrento esse erro muitas vezes ao tentar instalar o pacote usando sudo apt-get
, eu tentei muitas soluções, mas nada consertou meus problemas. Acho que o pacote está quebrado, mas ainda não consigo removê-lo.
Aqui está o que eu tenho quando estou executando o comando sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
jdk1.8.0-101
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 272 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 260352 files and directories currently installed.)
Removing jdk1.8.0-101 (1.8.0101-1) ...
find: ‘/usr/java/*’: No such file or directory
/var/lib/dpkg/info/jdk1.8.0-101.postrm: line 586: /usr/sbin/alternatives: No such file or directory
/var/lib/dpkg/info/jdk1.8.0-101.postrm: line 598: /usr/sbin/alternatives: No such file or directory
dpkg: error processing package jdk1.8.0-101 (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
jdk1.8.0-101
E: Sub-process /usr/bin/dpkg returned an error code (1)
Atualmente estou usando o Ubuntu 16.04 Xenial
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
Obrigado pela sua ajuda.