I'm trying to install Apache into Ubuntu Desktop 18.04.1, but retrieving the error: package apache2 has no installation candidate Any help, please? Thanks!

  • 1
    What is the output of cat /etc/apt/sources.list?
    – Kulfy
    Dec 20, 2018 at 10:59

1 Answer 1


I think this command could help you:

echo 'deb http://security.ubuntu.com/ubuntu bionic-security main' >> /etc/apt/sources.list && sudo apt update && sudo apt install apache2

This command adds repository which contains package apache2 for ubuntu 18.04, updates your source list and installs apache2.

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