I'm using Ubuntu 12.04.3 on an AWS EC2 instance. This is my first time with an EC2 so it's all new to me. I'm also not the most experienced Linux guy either, so I apologize if this is a stupid question.

I want to install a LAMP stack on my EC2 instance which I'm following this tutorial. However, the very first step is to install Yum. I made sure to enable SSH, HTTP and HTTPS in my security groups.

First I typed

sudo yum update -y

It didn't like that and responded with "sudo: yum: command not found"

I then just did

yum update -y

It responded with"

The program 'yum' is currently not installed.  You can install it by typing:  apt-get install yum". 

So after typing that to install yum I get the following messages

Err http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libnss3 amd64 3.14.3-0ubuntu0.12.04.1

  403  Forbidden
Err http://security.ubuntu.com/ubuntu/ precise-security/main libnss3 amd64 3.14.3-0ubuntu0.12.04.1

  404  Not Found [IP: 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/n/nss/libnss3_3.14.3-0ubuntu0.12.04.1_amd64.deb  404  Not Found [IP: 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Considering this is the official tutorial through AWS, I'm not quite sure where to turn. I'd appreciate some advice/help.


Ubuntu is based on Debian, which uses apt not yum which is what Red Hat uses. The Debian equivalent of:

yum update -y

Would be:

sudo apt-get update

As for your results when running apt-get install yum

Err http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libnss3 amd64 3.14.3-0ubuntu0.12.04.1
403  Forbidden

Would seem to indicate you don't have access to that file (I get the same forbidden error myself).

apt-get update should resolve your 404 errors, which are probably just caused by an unsynced or outdated package index.

I'm not entirely sure how Amazon operates their EC2 servers, but you should be able to install a LAMP stack withtaskel see: What's the easiest way to set up a LAMP stack?

| improve this answer | |
  • Thank you, that worked for me. I was able to install LAMP with no problems – user1104854 Nov 28 '13 at 5:12

For me it was just because I was not running this command from the /usr/bin folder where yum is located. For some reason the /usr/bin was not in the path variable.

| improve this answer | |

To resolve the "forbidden" errors use:

sudo apt-get install yum

instead of apt-get install yum

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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