i installed apache2 several times using

sudo apt-get install apache2

here is the image of my terminal

then after that, i tried to open and localhost on browser

but it is not working.

i checked again the apache if it is already installed using

apache2 -v

the result is:

The program 'apache2' is currently not installed. You can install it by typing:
sudo apt install apache2-bin
Do you want to install it? (N/y)

and when i clicked Y

it shows this


i entered this command

sudo apache2ctl start

and it shows this:

/usr/sbin/apache2ctl: 143: /usr/sbin/apache2ctl: /usr/sbin/apache2: not found
Action 'start' failed.

it looks like i have missing packages.


these are the installed apache packages i have;

apache2                     install
apache2-bin                 install
apache2-data                install
apache2-doc                 install
apache2-utils               install
libapache2-mod-php5.6       install
libapache2-mod-svn          install
libapache2-svn              install


Guys, i just remembered. i used whereis apache before to locate the apache directories. and instead of using purge or remove, i deleted all the directories shown on my terminal manually using rm -rf.

Does this affect the future installation of apache?

  • Did you tried sudo service apache2 restart ? – sgiri May 23 '16 at 11:44
  • yes. even sudo service apache2 stop then sudo service apache2 start, are not working – gray May 23 '16 at 11:47
  • 1
    maybe you are not doing it right and missing some upgrades. Follow steps that is described in this blog: [linode.com/docs/websites/apache/… – sgiri May 23 '16 at 11:51
  • @sgiri the site is currently down. i already did this process before in installing apache, but this time it is not working. – gray May 23 '16 at 11:54
  • Reinstall apache2-bin using apt-get install --reinstall apache2-bin – Florian Diesch May 23 '16 at 11:56

apache2 is now working. i just need to restart my pc. :)


Try to install LAMP maybe, because of library dependencies it could not install properly. Install LAMP in Ubuntu 16

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.