I am trying to install java in Ubuntu but it is giving me this error:
$ sudo apt-get install default-jre 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.6-43ubuntu2) but it is not going to be installed Depends: openjdk-6-jre (>= 6b23~pre11-1ubuntu1~) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
When I try to install anything from Software Center either
It shows me this error:
When I go to Software Center > Edit > Software Sources is disabled.
I have tried many solution but nothing works:
sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade sudo apt-get clean sudo apt-get autoclean
This the result of
apt-cache policy default-jre and
apt-cache policy default-jre-headless.
$ apt-cache policy default-jre default-jre: Installed: (none) Candidate: 1:1.6-43ubuntu2 Version table: 1:1.6-43ubuntu2 0 500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages $ apt-cache policy default-jre-headless default-jre-headless: Installed: (none) Candidate: 1:1.6-43ubuntu2 Version table: 1:1.6-43ubuntu2 0 500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
When I tried
dpkg --get-selections | grep hold it does't show any error!