Having problems getting a trial started

I am trying to follow the instructions here to install but somehow I get error during installation for both ubuntu 14 and 16

https://docs.newrelic.com/docs/infrastructure/new-relic-infrastructure/installation/install-infrastructure-linux

When I am doing the step on sudo apt update -y
I get this error though
W: Failed to fetch http://download.newrelic.com/infrastructure_agent/linux/apt/dists/trusty/InRelease Unable to find expected entry 'maindeb/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

Hi, @et4891: Please check the file /etc/apt/sources.list.d/newrelic-infra.list and verify that the line:

deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt trusty main 

appears there. If not, you may delete the file:

sudo rm /etc/apt/sources.list.d/newrelic-infra.list

And re-create it:

printf "deb [arch=amd64] http://download.newrelic.com/infrastructure_agent/linux/apt trusty main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list

(For Ubuntu 16, replace the string “trusty” with “xenial” in the above instructions.)

1 Like

Hi @et4891 - and welcome to the Explorers Hub. It looks like Phil got you pointed in the right direction. We look forward to hearing if this worked for you or if there is more we can troubleshoot with you!

Thanks for the prompt reply, and sorry for my late reply though.

I went into the server and run this
cat /etc/apt/sources.list.d/newrelic-infra.list
which got me
deb [arch=amd64] http://download.newrelic.com/infrastructure_agent/linux/apt trusty maindeb [arch=amd64] http://download.newrelic.com/infrastructure_agent/linux/apt trusty maindeb [arch=amd64] http://download.newrelic.com/infrastructure_agent/linux/apt trusty maindeb [arch=amd64] http://download.newrelic.com/infrastructure_agent/linux/apt trusty maindeb [arch=amd64] http://download.newrelic.com/infrastructure_agent/linux/apt trusty maindeb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt trusty main

I believe I entered it too many times?

But anyways, I still remove the file and re-create it by using the command you gave me.
I cat the file again, there’s only one line in there.

I tried doing sudo apt update -y
There’s another error which I do believe has nothing with Relic at all
> W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max
> W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-min
> W: You may want to run apt-get update to correct these problems

So I actually skip it and continue with the installation command of sudo apt-get install newrelic-infra -y

I do believe it’s working now as I am seeing a cpu graph with my private ip shown.

Thanks a lot for the help~

This is weird,

I wanted to make sure that I am doing everything right instead of like this time, I did it half way having error then had to continue half way. I want to try setting up properly at once, so I started another server with the with the same web server and everything.

Again, I followed the instructions in https://docs.newrelic.com/docs/infrastructure/new-relic-infrastructure/installation/install-infrastructure-linux

this time it’s xenial so I replaced trusty with xenial

but I am getting this error though

Reading state information... Done
newrelic-infra is already the newest version (1.0.956).
0 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up newrelic-infra (1.0.956) ...
/var/lib/dpkg/info/newrelic-infra.postinst: 4: /var/lib/dpkg/info/newrelic-infra.postinst: initctl: not found
/var/lib/dpkg/info/newrelic-infra.postinst: 7: /var/lib/dpkg/info/newrelic-infra.postinst: initctl: not found
dpkg: error processing package newrelic-infra (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 newrelic-infra
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hi @et4891,

The Ubuntu 16 version of the Infrastructure repo looks for SystemD (systemctl) as an init system. However, the repo that you’re downloading is looking for initctl, which is not present (this is why you’re seeing initctl: not found errors).

I believe that you may be pulling down the wrong repo.

Let’s start from scratch with this installation.

First, get rid of /etc/apt/sources.list.d/newrelic-infra.list with sudo rm /etc/apt/sources.list.d/newrelic-infra.list.

Now, we can start over with a clean install (omitting the part where you set up your config file, as I assume you’ve already got that handled).

  1. curl https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo apt-key add -
  2. printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
  3. sudo apt-get update
  4. sudo apt-get install newrelic-infra -y

What this should do is pull down the version of the Infrastructure repo that will look for systemctl as an init system.

I hope this helps. Give this a shot and let us know how it works!

I re-did it as you mentioned and I actually used your commands too but the same error still shows…

cat /etc/apt/sources.list.d/newrelic-infra.list
would show
deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt xenial main

I also checked which ubuntu I am using by lsb_release -a
and my output is

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.4 LTS
Release:	16.04
Codename:	xenial

somehow I am still getting the same error.

Hi @et4891,

Could you try running the following commands:

sudo apt-get purge newrelic-infra
sudo apt-get clean all
sudo apt-get update
sudo apt-get install newrelic-infra

I want to make sure no residual information in the repos is still in place and messing up that installation process.

Let us know how it goes!