Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Cannot install infrastructure agent on Amazon Linux - RPM upstart issue?



I followed the instructions here and get an error installing that leads me to think the RPM is not made properly for Upstart based systems like Amazon Linux (looking for systemctl). I just updated to the latest version of Amazon Linux and it’s the same

$ cat /etc/system-release
Amazon Linux AMI release 2017.03

$ sudo yum install newrelic-infra -y
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package newrelic-infra.x86_64 0:1.0.677-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                             Arch                        Version                           Repository                           Size
 newrelic-infra                      x86_64                      1.0.677-1                         newrelic-infra                       14 M

Transaction Summary
Install  1 Package

Total download size: 14 M
Installed size: 42 M
Downloading packages:
newrelic-infra-1.0.677-1.x86_64.rpm                                                                                   |  14 MB     00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : newrelic-infra-1.0.677-1.x86_64                                                                                           1/1
/var/tmp/rpm-tmp.mF5ohq: line 4: systemctl: command not found
warning: %posttrans(newrelic-infra-0:1.0.677-1.x86_64) scriptlet failed, exit status 127
Non-fatal POSTTRANS scriptlet failure in rpm package newrelic-infra-1.0.677-1.x86_64
  Verifying  : newrelic-infra-1.0.677-1.x86_64                                                                                           1/1

  newrelic-infra.x86_64 0:1.0.677-1


Agent is not installed

$ sudo initctl status newrelic-infra
initctl: Unknown job: newrelic-infra



Can you check your /etc/yum.repos.d/newrelic-infra.repo and see if it contains the following?

name=New Relic Infrastructure

The OS for AWS Linux 2017.03 uses Upstart. I have verified that. This means that the appropriate command for starting the agent should be “initctl”

Since the installation is saying that it is trying to use systemctl it leads me to believe you may have grabbed the wrong line in the installation instructions. If you used the line for CentOS / RHEL instead of Amazon you might end up with the following in the newrelic0infra.repo file


This would cause a download for the version that uses Systemd which does use systemctl.

If my suspicions are correct, then you will have to remove the current agent version using yum remove newrelic-infra. Then either:

  • step through the instructions for the installation again making certain you use Amazon Linux, or

  • edit the newrelic-infra.repo file and change the baseurl line from .../yum/el/7/x86_64... to .../yum/el/6/x86_64... Then execute:

sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra
sudo yum install newrelic-infra -y

I hope that information helps.


Wow, expertly diagnosed. I hadn’t noticed the Amazon line in the instructions on setting up the right repo. I’m all set now. Thank you!


I am having the same problem, I’m using the Linux AMI

$ cat /etc/system-release
Amazon Linux AMI release 2018.03

/etc/yum.repos.d/newrelic-infra.repo file is as follows:

name=New Relic Infrastructure


$ sudo initctl status newrelic-infra
initctl: Unknown job: newrelic-infra