0

I'm having issues installing anything on my ubuntu 16.04 since I've messed with java install. Here's what I get --

sudo apt-get -f install htop

Reading package lists... Done Building dependency tree
Reading state information... Done E: The package jre1.8.0-111 needs to be reinstalled, but I can't find an archive for it.

Any suggestions?

Mark Kirby
  • 18,529
  • 19
  • 78
  • 114
  • How did you install jre on your system? Also, don't use -f to install software. – Mark Kirby Nov 06 '16 at 15:45
  • 3
    Please don't crosspost http://stackoverflow.com/questions/40447084/linux-ubuntu-16-04-apt-get-not-working Remove the question from SO, it is off topic there, that site is only for programming. – Mark Kirby Nov 06 '16 at 15:49
  • I'll remove it from SO – Ianis S Nov 06 '16 at 16:43
  • I've tried to install jre on the system, had some issues, tried a couple of different things from the www and failed. It was a week ago, so I can't remember exactly what I did, but I know it didn't work. Now I can't install anything anymore :(. – Ianis S Nov 06 '16 at 16:47
  • Removing is one thing, but this is preventing me from installing new ones... I'll read through it and let you know. – Ianis S Nov 06 '16 at 17:13
  • @IanisS I think after you remove jre like by the link, it would fix the problem with installing either. – Hi-Angel Nov 06 '16 at 21:45

1 Answers1

0

Try with

sudo apt-get install -f

It should remove Java. Then reinstall it You can also try with Synaptic (if you have already installed it)

sudo synaptic

Or just

sudo apt-get remove --purge *java*

And then reinstall java

Aegefel
  • 336
  • 2
  • 11
  • I've tried all commands here, but all result in the same : E: The package jre1.8.0-111 needs to be reinstalled, but I can't find an archive for it. Synaptic's not installed, but I can't install anything anyway. – Ianis S Nov 06 '16 at 16:46
  • Try to download jre1.8.0-111 from the Java website and try the command sudo dpkg --remove jre1.8.0-111 – Aegefel Nov 06 '16 at 17:54