ERROR batch install AMP (getamp.sh) for Rocky Linux

OS Name/Version: Rocky Linux 9.1

Product Name/Version: Install AMP for home AMP web

Problem Description:

Hello, Unable to install the AMP component automatically on Rocky Linux 9.1.
There is an error installing the JAVA component, on the Adoptium repo. Rocky version 9.1 does not exist and path to version 8 is not correct in script

Actions taken to resolve so far:

Step 1:

Download getamp.sh
edit getamp.sh

vi getamp.sh

change

[Adoptium]
name=Adoptium
baseurl=https://packages.adoptium.net/artifactory/rpm**/$ID/$VERSION_ID/$(uname -m)**

for

/rocky/8/$(uname -m)

step 2

chmod +x
and lunch install .sh in local

./getamp.sh

and enjoy!!!

Select “No” when it asks about Java and install it manually afterwards. Right now there’s no rocky-specific code path in the installer .

even selecting no for java installation. the installation forces the repo then the installation of the java which fails. for proof I can provide the log.

Had this same issue with installing on a fresh Rocky 8 install.

Seems when the adoptium repo is added, it detects the OS as 8.8 and sets the /etc/yum.repos.d/adoptium.repo with the following

baseurl=https://packages.adoptium.net/artifactory/rpm/rocky/8.8/x86_64

Editing this line to
baseurl=https://packages.adoptium.net/artifactory/rpm/rocky/8/x86_64
then making the repo file immutable with the following command
chattr +i /etc/yum.repos.d/adoptium.repo
then executing the install command bash <(wget -qO- getamp.sh) lets the installation complete as expected.

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. I haven’t tried it on Rocky but seems likely to be close.

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)