Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running ubuntu 10.10 64bit using the stock ami on a micro ec2, when i try to install apache i get

sudo: apt-get: command not found

is the apt package not installed on the EC2 AMIs?

if so how do i get apt back or work around it?

share|improve this question
whats the output from uname -a? – pablo Mar 1 '11 at 19:13

It could be a path issue try

sudo /usr/bin/apt-get ...

You can set the path that sudo will search with the secure_path directive in the sudoers file


Path used for every command run from sudo. If you don’t trust the people running sudo to have a sane PATH environment variable you may want to use this. Another use is if you want to have the "root path" be separate from the "user path." Users in the group specified by the exempt_group option are not affected by secure_path. This is not set by default.

share|improve this answer

Do dpkg -l |grep apt and have a look if the package is really installed. If yes, try to use /usr/bin/apt-get instead of apt-get.

If apt-get is not installed and it is indeed an Ubuntu system, something is wrong with your installation. One week ago, I installed the same OS on a test EC2 instance, and apt-get worked from the very beginning.

Maybe you "reinstall" your instance by deleting and recreating it? Are you sure that it is really an Ubuntu?


cat /etc/issue

and have a look - maybe you missclicked and used the wrong image.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.