RHEL Repo not downloading

Note - If you do not fill in every section below, your post won’t be answered - you must provide the steps you have followed so far and the actions you’ve already taken. Make sure to remove this notice from your post too.

OS Name/Version: Red Hat Enterprise 9

Product Name/Version: RHEL 9

Problem Description: Adoptium won’t download. Attached are the screenshots.

If you're sharing console output, logs, or commands you have run, please make sure to use code tags 
(3x backticks for blocks, 1x backtick for a single line) to help make posts readable. This also
provides syntax highlighting.

Steps to reproduce:

  • Step 1
  • Reinstalled VM and attempted again.
  • Step 2
  • Copied the exact setup I did on my other RHEL VM that is working, same issue.
  • Step 3
  • Verified all the contents of the VM and look at what could have been ,missing.

Actions taken to resolve so far:

  • I’ve checked the the adoptium.repo and the URL looks correct.

  • This happens when installing AMP for the first time. Every other package installed without an issue but this is the only one preventing AMP from being installed.

  • I’ve attempted to manually download it from the website and execute it manually but I have the same issue as well.

I had the same issue installing on RHEL 8.5 and 8.7. It turns out the adoptium URL is not correct in the installer, because the OS minor version (the .5 part of 8.5) should not be part of the URL. It’s easy to fix in the installer script, but you’d have to download and extract it first.

I came up with a one liner to fix it, just set your correct OS major version in the variable at the beginning instead of the 8 I used.

export OS_MAJOR_VERSION=8 && bash <(wget -qO- getamp.sh | sed 's/bash <(echo $DATA | base64 -d | gzip -dcq) $1/echo $DATA | base64 -d | gzip -dcq > ampinstaller/') && bash <(sed "s/\$ID\/\$VERSION_ID/\$ID\/${OS_MAJOR_VERSION}/" ampinstaller)