0

I am getting the following error while trying to install default-jre. How can I solve this issue?

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:
default-jre : Depends: default-jre-headless (= 1:1.7-43ubuntu4) but it is not going to be installed
Depends: openjdk-7-jre (>= 7~u3-2.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
0

2 Answers 2

1

Use aptitude instead of apt,

sudo apt-get install aptitude
sudo aptitude -f install
2
  • I tried this but I am getting the following error. The following packages have unmet dependencies: tzdata-java : Depends: tzdata (= 2013g-0ubuntu0.13.04) but 2014e-0ubuntu0.12.04 is installed.
    – shaikh
    Commented Jul 9, 2014 at 6:16
  • 1
    It seems you have saturated apt-get database. Then, the dependencies hell happened. Have you tried with sudo aptitude -f install default-jre?
    – sugab
    Commented Jul 9, 2014 at 6:41
0

Try Code:

sudo apt-get update

to update your package list. Then Code:

sudo apt-get autoclean

to clean up any partial packages. Then Code:

sudo apt-get clean

to clean up the apt cache. Code:

sudo apt-get autoremove

will clean up any unneeded dependencies. If while doing this you can identify the broken package this code will very forcefully remove it. Code:

sudo dpkg --remove -force --force-remove-reinstreq package name

Change package name to the real name of course.

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