Install Open JDK 8 on CentOS 7.4

I have an Ec2 instance running CentOS 7.4.1 and I'm trying to install open JDK 8 onto it. This is the command I'm using to install Java:

sudo yum install java-1.8.0-openjdk-devel 

It produces the following:

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile No package java-1.8.0-openjdk-devel available. Error: Nothing to do 

This site contains a list of the different rpm packages that are available for each distribution, CentOS 7.4 is not listed which leads me to believe that, that's why the above method did not work. Is it possible to install Open JDK 8 onto CentOS 7.4?

2

1 Answer

The Repository needed to be enable first before open JDK 8 could be installed.

sudo yum update sudo yum repolist all 

Check the repo id ultra-centos-7.x-openjdk exists.

sudo yum-config-manager --enable ultra-centos-7.x-openjdk sudo yum install java-1.8.0-openjdk-devel 

Confirm the installation using -

java -version 

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

You Might Also Like