Ubuntu Server 14.04 LTS for Azure does not come with Java pre-installed.
The server architecture is AMD64.

I know that you cannot install both the x64 and x86 JREs side-by-side, and I only need the x86 version (application requirements, memory requirements, etc).

Both the x86 and x64 versions of OpenJDK-7-JRE are available directly from Ubuntu here:

However, Ubuntu strongly recommends using a package manager (such as apt) to install the package, rather than downloading the binaries using a web-browser and manually copying to the destination machine.

Therefore, I've been trying to install from the command line, but I'm running into issues:

MyAdmin@Server01:~$ sudo apt-get install openjdk-7-jre:i386 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package openjdk-7-jre MyAdmin@Server01:~$ 

The installation is successful if I omit the i386, but then I get the 64-bit JRE by default - which is not what I need.

I've confirmed that the source is already added in /etc/apt/sources.list

deb trusty-security main deb-src trusty-security main deb trusty-security universe deb-src trusty-security universe # deb trusty-security multiverse # deb-src trusty-security multiverse 

Is there another package, library, or repository that I need to install or update, before I can proceed with the apt installation of the OpenJDK x86 JRE?

3

1 Answer

It turns out I needed to explicitly add support for 32-bit architecture to the system.

openjdk-7-jre:i386 installed successfully after I did this:

sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install openjdk-7-jre:i386 

NOTE: ia32-libs and any other necessary prerequisites are automatically selected and installed when you install openjdk-7-jre:i386. There's no need to install ia32-libs manually, and it's best to install the automatically selected libraries to ensure you definitely get the right version etc.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy