5

I would like to know if and how is it possible to install a specific version (version and update version) of a OpenJDK on an Ubuntu server?

I know how to install it normally following the documentation on OpenJDK Site with the following command (Yes, I need it to be the jdk):

sudo apt-get install openjdk-7-jdk

The problem is that I'm creating a server to be used as test server and the production one uses OpenJDK version 7 update 55. I was asked to install the very same version. That is where I'm stuck. I've tried somethings with the apt-get command like:

sudo apt-get install openjdk-7-jdk=7u55-2.6.6-0ubuntu0.12.04.1

sudo apt-get install openjdk-7-jdk=7u55-2.4.7-1ubuntu0.12.04.2    

sudo apt-get install openjdk-7-jdk=7u55

sudo apt-get install openjdk-1.7.0.55-jdk

Of course, none of those commands worked. For all of then I get the E: Version '[given_version]' for 'openjdk-7-jdk' was not found

Running on production server the command apt-cache policy openjdk-7-jdk I get this output:

openjdk-7-jdk:
  Installed: 7u55-2.4.7-1ubuntu1~0.12.04.2
  Candidate: 7u101-2.6.6-0ubuntu0.12.04.1
  Version table:
     7u101-2.6.6-0ubuntu0.12.04.1 0
        500 http://ftp.daum.net/ubuntu/ precise-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/universe amd64 Packages
 *** 7u55-2.4.7-1ubuntu1~0.12.04.2 0
        100 /var/lib/dpkg/status
     7~u3-2.1.1~pre1-1ubuntu2 0
        500 http://ftp.daum.net/ubuntu/ precise/universe amd64 Packages

My Ubuntu server version is:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"
NAME="Ubuntu"
VERSION="12.04.3 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.3 LTS)"
VERSION_ID="12.04"

I even find out the package I need online But I don't know how to install it.

1 Answer 1

1

I was able to solve it. First I had to download all the packages on the link I mentionded Ubuntu Secure Proposed team

I did it using the following commands:

sudo wget https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+build/5935007/+files/openjdk-7-jre_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo wget https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+build/5935007/+files/openjdk-7-jre-zero_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo wget https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+build/5935007/+files/openjdk-7-jre-headless_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo wget https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+build/5935007/+files/openjdk-7-jdk_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb

Then I tried to install all of then manually on this order:

sudo dpkg -i openjdk-7-jre-zero_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo dpkg -i openjdk-7-jre-headless_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo dpkg -i openjdk-7-jre_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo dpkg -i openjdk-7-jdk_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb

All of above commands will result in dependencies errors, I just ignore then all and run the following command:

sudo apt-get -f install

Everything got installed and it is working fine. It seems that the apt-get -f install command try to solve previous dependencies errors by itself installing all needed dependencies (not sure though, as I'm not an specialist).

If someone think that this is not the right procedure, please let me know.

You must log in to answer this question.

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