Apache2 не работает после переустановки в Linux Mint - PullRequest
0 голосов
/ 22 июня 2019

Я недавно установил стек LAPM с PHP7 на своем ноутбуке с Linux Mint. Теперь я хотел использовать PHP5.6. Не ища дополнительную информацию, я просто удалил все содержимое стека LAMP с помощью следующей команды.

  • sudo apt-get purg phpmyadmin
  • sudo apt-get purge mysql-server apache2
  • sudo apt-get purge mysql
  • sudo apt-get purg php
  • sudo apt-get autoremove

Затем я использую команду whereis, чтобы узнать все о php, apache, mysql и удалить вручную. Снова выполните команду sudo apt-get autoremove.

Теперь я перезагружаю ноутбук, чтобы убедиться, что ничего не работает в фоновом режиме, что вызывает конфликт при установке стека LAMP.

Я планировал установить двойной экземпляр php 5.6 и 7.2. Вот почему я добавил новый PPA с помощью следующей команды.

  • sudo add-apt-repository ppa: ondrej / php
  • sudo apt-get update

Теперь я попытался установить Apache с помощью команды: sudo apt-get install apache2 и нашел следующие сценарии ошибок в командной панели:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  apache2-data apache2-utils
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed:
  apache2 apache2-data apache2-utils
0 upgraded, 3 newly installed, 0 to remove and 28 not upgraded.
Need to get 0 B/330 kB of archives.
After this operation, 1,718 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package apache2-utils.
(Reading database ... 283056 files and directories currently installed.)
Preparing to unpack .../apache2-utils_2.4.18-2ubuntu3.10_amd64.deb ...
Unpacking apache2-utils (2.4.18-2ubuntu3.10) ...
Selecting previously unselected package apache2-data.
Preparing to unpack .../apache2-data_2.4.18-2ubuntu3.10_all.deb ...
Unpacking apache2-data (2.4.18-2ubuntu3.10) ...
Selecting previously unselected package apache2.
Preparing to unpack .../apache2_2.4.18-2ubuntu3.10_amd64.deb ...
Unpacking apache2 (2.4.18-2ubuntu3.10) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
ureadahead will be reprofiled on next reboot
Processing triggers for systemd (229-4ubuntu21.21) ...
Setting up apache2-utils (2.4.18-2ubuntu3.10) ...
Setting up apache2-data (2.4.18-2ubuntu3.10) ...
Setting up apache2 (2.4.18-2ubuntu3.10) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Sat 2019-06-22 17:38:57 +06; 4ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 4604 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Jun 22 17:38:57 microsolutionsbd apache2[4604]:  *
Jun 22 17:38:57 microsolutionsbd apache2[4604]:  * The apache2 configtest failed.
Jun 22 17:38:57 microsolutionsbd apache2[4604]: Output of config test was:
Jun 22 17:38:57 microsolutionsbd apache2[4604]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apache2/mods-enabled/a...
Jun 22 17:38:57 microsolutionsbd apache2[4604]: Action 'configtest' failed.
Jun 22 17:38:57 microsolutionsbd apache2[4604]: The Apache error log may have more information.
Jun 22 17:38:57 microsolutionsbd systemd[1]: apache2.service: Control process exited, code=exited status=1
Jun 22 17:38:57 microsolutionsbd systemd[1]: Failed to start LSB: Apache2 web server.
Jun 22 17:38:57 microsolutionsbd systemd[1]: apache2.service: Unit entered failed state.
Jun 22 17:38:57 microsolutionsbd systemd[1]: apache2.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
Processing triggers for ureadahead (0.100.0-19.1) ...
Processing triggers for systemd (229-4ubuntu21.21) ...
Processing triggers for ufw (0.35-0ubuntu2) ...

Какое решение для работы Apache?

...