Reinstall Apache2, after remove on Ubuntu 16.04
12,407
Solution 1
It happened to me as well and I fixed it by:
- uninstalling the package
- $ whereis apache2
- manually remove anything related to it
- fresh package reinstall
Solution 2
Finally, it works! :)
After install php, i typed in terminal:
gksu gedit /etc/apache2/apache2.conf
Then add the following line to the end of the file.
Include /etc/phpmyadmin/apache.conf
Then restart apache
/etc/init.d/apache2 restart
Thanks for help @Hellas and i hope this command helps somebody!
Related videos on Youtube
Author by
Diaconu Eduard
Updated on September 18, 2022Comments
-
Diaconu Eduard almost 2 years
I have few errors with mysql-server, and after i tried more command in terminal, i don't find a proper way to resolve.
I decided to remove all (phpmyadmin, mysql, apache2). Mysql and phpmyadmin, remove successfully, but i have problem with apache2..
For Apache2, i use this command in terminal:
sudo apt-get autoremove udo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
After that, i try install again apache2.
sudo apt-get update sudo apt-get install apache2
But, localhost refused to connect.
In etc/hosts.conf is empty, what is necessary to add there? Maybe, is possible to exist another problem?
Thank you for help!
-
Diaconu Eduard almost 8 yearsThanks for your reply and help! :) Can you offer more details about 4 step? (what command to use in terminal).
-
Hellas almost 8 yearssudo apt-get install apache2 --- installs apache2; if you need more info I need more info myself on what do you what to use it for, in order for me to know how to help you
-
Diaconu Eduard almost 8 yearsThank you again! I use apache2 for website host. I try your command in terminal, but i recive this error: E:Unable to locate package apache2---installs .
-
Hellas almost 8 yearssudo apt-get install apache2 ( --- installs apache2 was only the description of what it does, meaning it only installs the service)
-
Diaconu Eduard almost 8 yearsOh, sorry for mistake. It works, thank you so much! I want to use apache for website host. Now i try install phpmyadmin and mysql service .
-
Hellas almost 8 yearsGood. No problem. PS: Bafta in continuare :D
-
Diaconu Eduard almost 8 yearsUh, multumesc tare mult :)) Now, when i try to install libapache2-mod-auth-mysql and php-mysql phpmyadmin, i recive: Unable to locate package libapache2-mod-auth-mysql and php7-mysql. Do you have idea what can i do for solve this...?
-
Hellas almost 8 yearsPlease write the full command line you have entered preceded by $ (example: $ sudo apt-get install apache2 )
-
Hellas almost 8 yearsyou might've tried to install outdated packages; some new ones are out there and include the old ones; try $ sudo apt-get install php5-mysql phpmyadmin
-
Diaconu Eduard almost 8 yearsFirst time, i try to use sudo apt-get install libapache2-mod-auth-mysql php7-mysql phpmyadmin . I typed your command, but i revice: E: Package 'php5-mysql' haso no installation candidate . (Multumesc tare mult de ajutor, de azi dimineata tot ma chinui. Am programele functionale pe windows, dar sunt nevoit sa fac switch-ul pe Ubuntu, cu care din pacate nu am mai avut tangente si ma lovesc de tot felul de erori)
-
Diaconu Eduard almost 8 yearsActually, now i find a command to install php, and works. :) But, still have problems with phpmyadmin, when i try to install i receive: Errors were encountered while porcessing: javascript-common libapache2-mod-php7.0 E: SUb-process /usr/bin/dpkg returned an error code(1) and for that, i don't find a solution to solve.
-
Hellas almost 8 yearsI will try to get back at you tomorrow, as I have to respect the fact that is a Saturday night incoming :) Catch you tomorrow!
-
Diaconu Eduard almost 8 yearsOh, thank you so much and enjoy the Saturday! :)