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?

4
  • How did you install Java?
    – A.B.
    Jul 23, 2015 at 12:53
  • i installed by downloading the rpm file on oracle page, used the alien command to extract the rpm file and the dpkg -i commando to install the deb file. but i found the solution now, just removed the file which was giving error: /var/lib/dpkg/info/jre1.8.0-51.postrm //// its working fine now, but thanks for answering me.
    – Boris L
    Jul 23, 2015 at 18:28
  • Good idea, write an answer. You have my upvote.
    – A.B.
    Jul 23, 2015 at 18:29
  • 1

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .