How to fix apt-get: command not found on AWS EC2?

Pat841 picture Pat841 · Dec 26, 2012 · Viewed 93.5k times · Source

I installed Ubuntu 12.04 on my instance and am trying to install packages using apt-get, but I am getting the following error:

sudo: apt-get: command not found

How do I fix this?

Answer

Engin Yapici picture Engin Yapici · Feb 3, 2013

Try replacing apt-get with yum as Amazon Linux based AMI uses the yum command instead of apt-get.