0

I had some problems with Apache, so I removed the entire folder from /etc , /var... now the command:

sudo apt-get install apache2

doesn’t work, I guess because there are no apache folder anymore. So:

  • Do I have to download it?
  • Any other solution?
  • can you post the error message you get when trying to reinstall? can you confirm exactly which folders you deleted? my current guess would be to uninstall the apache2 package via apt, then try and install again – david.libremone Feb 27 '14 at 12:19
  • see also askubuntu.com/questions/111770/how-reinstall-apache2 and the linked duplicate - if they help, mark your question as a duplicate – david.libremone Feb 27 '14 at 12:20
  • I followed the given link's command line, and here's what I got /etc/init.d/apache2: 51: .: Can't open /etc/apache2/envvars – Ziyad Mestour Feb 27 '14 at 12:35
  • sounds similar to the discussion between seadowg and ajmitch in the comments to this answer: askubuntu.com/a/26247/7146 - it would help if you edited your question to include exactly what you type in and what you get out in a formatted fashion (rather than in the comments) – david.libremone Feb 27 '14 at 13:07
  • It works! ... thank you so much d3vid!! – Ziyad Mestour Feb 27 '14 at 13:46
0

Try to uninstall it via apt-get with

sudo apt-get remove apache2

or

sudo apt-get purge apache2

If it doesn't help - provide full output of that commands.

  • after these commands I add sudo apt-get install apache2 ...Output:Reading package lists... Done Building dependency tree Reading state information... Done apache2 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. /*that's all normally it should be longer */ – Ziyad Mestour Feb 27 '14 at 12:50
  • Does removal command exited without errors? Apache2 catalogs still missing? You may try sudo apt-get install apache2 --reinstall – F2nd Feb 27 '14 at 13:06

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