curl: (6) Could not resolve host: bash. - Upgrade from the Legacy Metrics Agent to the Current Agent

Posted April 10, 2019 11.5k views
UbuntuLAMP StackMonitoringLinux CommandsUbuntu 18.04

Following this guide

Successfully uninstalled the legacy metrics agent.

When I reach step 2.
curl -sSL | sudo bash

I receive an error:
curl: (6) Could not resolve host: bash.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
9 answers

I have encountered the same issue and followed the instructions below from the support team:

  1. If you do not have bash as a shell you’d need to run the script using whatever shell you have installed. You can download the script with:

    curl -sSL -o /tmp/
  2. Run the installation:

    sudo bash /tmp/

Thanks cheey2003!

This worked for me.

They should add this to the official page for server ServerPilotNoobs like me : )

Thanks, I’m also stuck at step 2.

I get this: E: Unable to locate package do-agent
and dpkg: error processing package libroken18-heimdal:amd64 (--configure):
package libroken18-heimdal:amd64 is not ready for configuration
cannot configure (current status 'half-installed')
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Ideas? Thanks!

Thank you so much! That worked for me as well. Spent too long trying to figure out a workaround before this (to no avail).

thanks! nice work for me :)

I have too issue on step 2.
I get: E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Any suggestion please?

This fixed it for me as well – thanks!

For me there was an issue with the firewall. Apparently I had blocked (or rather never allowed) port 53 to allow for DNS resolution. So I added the port by typing ufw allow out 53 and the rebooted. Then I was able to run the script just fine. This answer is what came up first when I googled my issue so I am replying here in case anyone else finds it useful too.