2

Hi guys I have tried in recent days to install, obviously everything from termianl, the jdk for Java with no success. Later I tried to install WinUSB and everything went ok. Today panic, I'm going to install AWN and I find errors even when I type sudo apt-get update I solved these errors, but every time I try to install any application, terminal gives me errors like this. Down here is the complete code with that mistakes, maybe it happened to any of you, or know how to help me. The big problem is that I can't install anything else because I always have this error. Thank you in advice for your attention and for your help!

I write sudo apt-get install oracle-java7-installer

I need java for use Netbeans

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:
 oracle-java7-installer : Depends: java-common (>= 0.24) but it is not installable
                          Recommends: gsfonts-x11 but it is not installable
E: Unable to correct problems, you have held broken packages.

edited

java-common:
  Installed: (none)
  Candidate: (none)
  Version table:
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty
Linux giovanni-X551CAP 3.19.0-30-generic #34~14.04.1-Ubuntu SMP Fri Oct 2 22:09:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
  • Edit your question and add the output of apt-cache policy java-common; lsb_release -a; uname -a – A.B. Oct 27 '15 at 20:55
  • just edited – Giovanni Giampaolo Oct 27 '15 at 21:03
  • Try a sudo apt-add-repository main; sudo apt-get update; sudo apt-get install oracle-java7-installer – A.B. Oct 27 '15 at 21:09
  • Great, converted my comment into an answer. – A.B. Oct 28 '15 at 5:23
3

For whatever reason the main repository is missing or your package information was deleted or never updated. Execute the following commands:

sudo apt-add-repository main
sudo apt-get update
sudo apt-get install oracle-java7-installer
  • Great? Ok, than you should accept the answer. Click the checkmark at the left side of the answer. – A.B. Nov 22 '15 at 16:58
  • You saved my night. Thanks. Just want to know what does he first command do. – amit_kumar Apr 26 '16 at 19:07
  • @amit_kumar The first command adds the Ubuntu main repository to your system. – A.B. Apr 27 '16 at 7:18
-1

Purge the foreign ppa and Install openjdk from repository:

$ sudo apt install ppa-purge
$ ppa-purge [YOUR PPA]
$ sudo apt install openjdk-7-jre

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.