Unable to resolve host ip-10-0-0-58 or any other number after the “ip” is a common error that I receive every single time I am trying to run as root in a spun up EC2 instance. There is a simple solution but I have to look it up everytime. When that happens I just put it here so I don’t actually have to search for it.
All you have to do is edit your hosts file.
- Type in “sudo nano /etc/hosts” or use whatever program you prefer like vi instead of nano.
- On the line below localhost enter in this info: 127.0.0.1 ip-10-0-0-58
- Use whichever number that corresponds to your instance. This particular instance ends in 58 but your instance could end with any other number.
- save it and your done!