1

Since I was trying to install Java manually which I couldn't doing I have been having these errors while trying to install or update anything through terminal or update manager.

(Reading database ... 203927 files and directories currently installed.)
Removing jre1.8.0-51 (1.8.051-1) ...
find: `/usr/java/*': No such file or directory
/var/lib/dpkg/info/jre1.8.0-51.postrm: line 586: /usr/sbin/alternatives: No such file or directory
dpkg: error processing package jre1.8.0-51 (--remove):
 subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
 jre1.8.0-51
E: Sub-process /usr/bin/dpkg returned an error code (1)

i tried sudo apt-get autoclean

sudo apt-get install --reinstall dpkg
sudo dpkg -P jre1.8.0-51

none of them worked , i always get that error at the end. can anyone help?

David Foerster
  • 36,890
  • 56
  • 97
  • 151
Boris L
  • 31

1 Answers1

2

Just removed the file which was giving error.

sudo rm /var/lib/dpkg/info/jre1.8.0-51.postrm

That is no problem, because I want to remove the package anyway.

A.B.
  • 92,125
Boris L
  • 31