2
I’m trying to install JDK so I can install Netbeans.
Follow my attempt to install JDK:
Java version (Java -version):
java version "1.7.0_95" Openjdk Runtime Environment (Icedtea 2.6.4)
(7u95-2.6.4-0ubuntu0.15.10.1) Openjdk 64-Bit Server VM (build 24.95-b01, Mixed mode)
JDK installation command:
sudo apt-get install default-jdk
Exit from installation command:
kleber@magneto:~$ sudo apt-get install default-jdk
Reading lists of packages... Ready Building dependency tree
Reading the status info... Ready Some packages could not be installed. This may mean you requested a situation impossible or, if you are using the unstable distribution, that some required packages have not been created yet or have been removed from "Incoming". The following information can help resolve the situation:The following packages have different dependencies: default-jdk : Depends: openjdk-7-jdk (>= 7~U3-2.1.1) E: Impossible to fix problems, you kept (hold) broken packages.
Says it depends on the openjdk
then I run the command to install:
sudo apt-get install openjdk-7-jre
Out of command:
kleber@magneto:~$ sudo apt-get install openjdk-7-jre Reading lists packages... Ready Building Dependencies Tree Reading status information... Ready openjdk-7-jre is already the newest version. 0 updated packages, 0 new installed packages, 0 to be removed and 0 not updated.
Does anyone know what I have to do to get JDK installed?
I’m not sure, but is the command not
sudo apt-get install openjdk-7-jdk
? From what I understand, he needs the development kit (JDK) not the Runtime (JRE)– Gomiero
@Gomiero ran this command and gave ( The following packages have uncompressed dependencies: openjdk-7-jdk : Depends: openjdk-7-jre (= 7u85-2.6.1-5) Recommends: libxt-dev but will not be installed E: Impossible to fix problems, you kept (hold) broken packages. )
– Kleber Souza
I found this link that might help: How to install Java on Ubuntu with apt-get
– Gomiero
Run on the terminal:
sudo apt-get install -f
and run the commands to install what you need again. One more thing, before running this command update your repository withsudo apt-get update
.– gato
When I used linux, I installed the oracle jdk, just add the PPA
ppa:webupd8team/java
and after updating the system repository, ran aapt-get install oracle-jdkX-installer
where X is the version of JDK. Dai, ppa downloaded and installed both jdk and jre, and still logged in the browsers. I never had any problem in any of the verses of Ubuntu, from 8 to 14, which was the last one I installed.– user28595
apt-cache search jdk
to see all jdk-related packages, select the latest one and do:sudo apt-get install pacoteatual
, I believe that’s:sudo apt-get install oracle-jdk7-installer
– Ivan Ferrer