Trying to setup wordpress in EC2. found several tutorials in web and tried. their are few steps to setup apache, php, mysql. one thing is install httpd following command

yum install httpd

But I am failed to install getting following message

Setting up Install Process
No package httpd available. 
Nothing to do

how to do install httpd and running apache server

After running yum repolist enabled I got this result

repolist: 0
  • 1
    Can you run yum repolist enabled to show which repositories are enabled? Please update your question with the results.
    – cjc
    Mar 17, 2012 at 15:19
  • after running yum repolist enabled it shows repolist: 0 Mar 17, 2012 at 15:29
  • If you're this used to CentOS, why not use CentOS? Amazon even has their own CentOS-based "Amazon Linux" AMIs.
    – ceejayoz
    Mar 17, 2012 at 19:34

3 Answers 3


Your repos are either empty or inactive.

What's the contents of the directory /etc/yum.repos.d ?

Are you running Amazon Linux or some other Linux? Run cat /etc/issue.net.


OP is using Ubuntu, not a RHEL-based distro.

So, in that case, run the following:

sudo apt-get update
sudo apt-get install apache2

If you follow instructions from the web, look for Ubuntu-specific ones, rather than ones that pertain to RedHat-based systems.

Note that the Apache package for Ubuntu is called "apache2", not "httpd".

  • I am using Ubuntu 11.10. I cant find yum.repos.d in etc Mar 17, 2012 at 15:43
  • 1
    Oh. You should not be using "yum". That's the RedHat/CentOS/AmazonLinux package management tool. You should be using "apt-get". Let me update my Answer with information on what to do.
    – cjc
    Mar 17, 2012 at 15:44
  • Thanks cjc. I tried apt-get here is result E: Package 'httpd' has no installation candidate Mar 17, 2012 at 15:46
  • 1
    @Prasanna Correct, the package is named "apache2" in Ubuntu, not "httpd". See the last line of my updated Answer.
    – cjc
    Mar 17, 2012 at 15:50

It seems that the package "httpd" does not exist in your repository. Try searching via yum search, e.g. yum search apache or yum search http.

Another approach could be searching the internet for a CentOS/Suse/RHEL mirror and download the apache packages directly (or enhancing the list of your repos).

Btw, maybe this link will be an additional help: 1


Please check to make sure apache is not already installed.

httpd -v

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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