Amazon infrastructure install

When installing the infrastructure system for amazon linux for aarch64, I found a bug in the install.sh script. The relevant portion of the script looks like this:

if [ “$(uname -m)” == “x86_64” ]; then
MACHINE=“x86_64”
elif [ “$(uname)” == “aarch64” ]; then
MACHINE=“aarch64”
else
echo “This machine architecture is not supported. The supported architectures are x86_64 and aarch64.”
exit 1
fi

When I try to install on aarch64, it tells me that the architecture is not supported. The bug is a forgotten “-m” for uname for aarch64. The corrected code should be:

if [ “$(uname -m)” == “x86_64” ]; then
MACHINE=“x86_64”
elif [ “$(uname -m)” == “aarch64” ]; then
MACHINE=“aarch64”
else
echo “This machine architecture is not supported. The supported architectures are x86_64 and aarch64.”
exit 1
fi

Furthermore, it seems you don’t support aarch64 after all. The install kept crashing while retrieving the actual newrelic_cli file. I tracked down and as you can see, there are no aarch64 builds.

1 Like

Hi there!

I appreciate you reaching out about the flaw in the installation script. I’ll make sure this gets brought up with the relevant development team so it can be fixed. In the meantime, you should be able to use the steps below to install the infrastructure agent without the use of the CLI. The aarch64 architecture is the same thing as the ARM64 architecture but under a different name, so the steps below should install the ARM64 release of the agent.

Create a configuration file with your license key:
echo "license_key: {LICENSE_KEY}" | sudo tee -a /etc/newrelic-infra.yml

Create the agent’s yum repository
sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo

Update your yum cache
sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'

Run the installation script
sudo yum install newrelic-infra -y

This should install the infrastructure agent successfully without the need for the CLI, but please reach out if you notice further issues with the process!