EC2 Unable to install httpd

10,721

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.

Update:

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".

Share:
10,721

Related videos on Youtube

prasannaboga
Author by

prasannaboga

Updated on September 18, 2022

Comments

  • prasannaboga
    prasannaboga almost 2 years

    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
    
    • cjc
      cjc over 12 years
      Can you run yum repolist enabled to show which repositories are enabled? Please update your question with the results.
    • prasannaboga
      prasannaboga over 12 years
      after running yum repolist enabled it shows repolist: 0
  • prasannaboga
    prasannaboga over 12 years
    I am using Ubuntu 11.10. I cant find yum.repos.d in etc
  • cjc
    cjc over 12 years
    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.
  • prasannaboga
    prasannaboga over 12 years
    Thanks cjc. I tried apt-get here is result E: Package 'httpd' has no installation candidate
  • cjc
    cjc over 12 years
    @Prasanna Correct, the package is named "apache2" in Ubuntu, not "httpd". See the last line of my updated Answer.