• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoLinux ApplicationsHow to install apache2 and remove completely apach ...
Previous Next

How to install apache2 and remove completely apache2 ?

Posted by: Yang , June 5, 2014

Question:

I failed to install lamp and I have deleted /etc/apache2/ .The reinstallation of lamp does not add this directory
Anyone can help me how to reinstall this apache2 folder?

I used sudo rm -rf /etc/apache2 in stead of sudo apt-get remove apache2
any idea how to reinstall /etc/apache2?

Now, when running  sudo service apache2 start
I get:

$/etc/init.d/apache2: 51: .: Can't open /etc/apache2/envvars

 

How to Fix:

It really simple .

You got this error message : /etc/init.d/apache2: 51: .: Can’t open /etc/apache2/envvars
If you currently have it removed improperly, reinstall it by “sudo apt-get install apache2″ before to use the command bellow. To do that i will use this command :

$sudo apt-get remove --purge apache2 apache2-utils

This command will completely remove all apache2 configuration files and directories.
– Reinstall again apache using the normal command

Now your config files and directories in /etc/apache2 all be back and at their defaults as well as the “apache2-utils previously removed.

$sudo apt-get install apache2

$/etc/init.d/apache2   start

 

 This QA from pcDuino Forum: http://pcduino.com/forum/index.php?topic=4500.msg6995#msg6995

Tags: Linux Applications

Share!
Tweet

Yang

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors