0

I need to install jdk 17 on centos7. When I try the yum install, I get the below message

sudo yum install -y java-17-amazon-corretto-devel

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * fasttrack: mirror.centos.org
No package java-17-amazon-corretto-devel available.
Error: Nothing to do

I tried to follow https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/generic-linux-install.html(Using yum section). When I run the command to import corretto key, it times out. I tried the yum install -y java-17-openjdk-devel, i get the same error

yum install -y java-17-openjdk-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * fasttrack: mirror.centos.org
No package java-17-openjdk-devel available.
Error: Nothing to do

Does anyone know the solution?

sinsanarya
  • 73
  • 12
  • Did you run the steps before to import the key and setup the repo? It doesn't make sense that it's going to centos.org still. – stdunbar Jul 12 '22 at 02:20
  • This is the error I get while importing the key.```sudo rpm --import https://yum.corretto.aws/corretto.key curl: (7) Failed connect to yum.corretto.aws:443; Operation now in progress error: https://yum.corretto.aws/corretto.key: import read failed(2).``` – sinsanarya Jul 12 '22 at 04:50
  • It looks like you're behind a firewall / VPN of some sort. I'd get that sorted out first. – stdunbar Jul 12 '22 at 14:06

1 Answers1

1

I had the same error and had a look here: https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/generic-linux-install.html

You need to run the following before installing:

 sudo rpm --import https://yum.corretto.aws/corretto.key 
 sudo curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo
Tobsi
  • 11
  • 4