2

I've tried running the command:sudo yum install apache2 and got the following error:

Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest                     | 2.1 kB     00:00     
amzn-updates/latest                  | 2.3 kB     00:00     
No package apache2 available.
Error: Nothing to do

I'm a linux newbie on Ubuntu (newbie there too) sudo apt-get install apache2 works why?

m13r
  • 174
  • 8
Kukula Mula
  • 163
  • 1
  • 2
  • 3

1 Answers1

6

The default package manager for installing packages in Ubuntu is apt-get not yum. So it is the best to use apt-get for installing packages and not yum.

To install apache with yum you can execute:

sudo yum install httpd
m13r
  • 174
  • 8
  • 4
    The core of this answer is the following: The name of the package on your system, which appears to be Amazon Linux, is `httpd` and not `apache2` like on Ubuntu. – Sven Jun 02 '16 at 09:48