apt - Apache2 package does not have "apache2.conf" file

Asked

Viewed 163 times

1

I recently started using Ubuntu 16.04
I’m following this tutorial to install the LAMP.

sudo apt-get install apache2

After encountering several errors, I realized that the package is coming without the apache configuration file,apache2.conf.

What am I doing wrong?

Below, I put out the command sudo apache2ctl configtest

user@host:/$ sudo apache2ctl configtest
[sudo] password for user: 
/usr/sbin/apache2ctl: 165: /usr/sbin/apache2ctl: /usr/sbin/apache2: not found
Action 'configtest' failed.
The Apache error log may have more information.
  • For future query, I only managed to solve this problem by formatting the system and reinstalling Ubuntu.

1 answer

1

A simpler solution than reinstalling all linux is to try to remove all the packages you installed using:

  sudo apt-get purge <nome_do_pacote>

Soon after use:

  apt-get autoremove

To delete any remaining package and install Lamp Server using the following command:

  apt-get install lamp-server^

This will mark all necessary packages and make the installation easily for you.

  • Thank you so much for the answer! I already have everything solved, but the answer was good

Browser other questions tagged

You are not signed in. Login or sign up in order to post.