Невозможно удалить apache2 из ubuntu16.04

Я пытаюсь удалить apache2, используя apt-get purge apache2, он показывает это

root@indrajit-MacBookPro:/home/indrajit# apt-get purge apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 apache2-suexec : Depends: apache2.2-common but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Пытался запустить apt-get -f install, и он также не работает.

root@indrajit-MacBookPro:/home/indrajit# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  apache2-data gstreamer0.10-gconf gstreamer0.10-plugins-good
  gstreamer0.10-pulseaudio gstreamer0.10-x libcdaudio1 libdirectfb-1.2-9
  libenca0 libmpcdec6 libslv2-9 linux-headers-4.4.0-31
  linux-headers-4.4.0-31-generic linux-headers-4.4.0-71
  linux-headers-4.4.0-71-generic linux-image-4.4.0-31-generic
  linux-image-4.4.0-71-generic linux-image-extra-4.4.0-31-generic
  linux-image-extra-4.4.0-71-generic snap-confine
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  apache2.2-bin apache2.2-common
Suggested packages:
  apache2-doc
The following NEW packages will be installed:
  apache2.2-bin apache2.2-common
0 upgraded, 2 newly installed, 0 to remove and 616 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1,572 kB of archives.
After this operation, 4,512 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 301525 files and directories currently installed.)
Preparing to unpack .../apache2.2-bin_2.2.22-1ubuntu1.11_amd64.deb ...
Unpacking apache2.2-bin (2.2.22-1ubuntu1.11) ...
dpkg: error processing archive /var/cache/apt/archives/apache2.2-bin_2.2.22-1ubuntu1.11_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/apache2/modules/mod_authnz_ldap.so', which is also in package apache2-bin 2.4.18-2ubuntu3.8
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../apache2.2-common_2.2.22-1ubuntu1.11_amd64.deb ...
Unpacking apache2.2-common (2.2.22-1ubuntu1.11) ...
dpkg: error processing archive /var/cache/apt/archives/apache2.2-common_2.2.22-1ubuntu1.11_amd64.deb (--unpack):
 trying to overwrite '/usr/share/apport/package-hooks/apache2.py', which is also in package apache2-bin 2.4.18-2ubuntu3.8
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for systemd (229-4ubuntu17) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Errors were encountered while processing:
 /var/cache/apt/archives/apache2.2-bin_2.2.22-1ubuntu1.11_amd64.deb
 /var/cache/apt/archives/apache2.2-common_2.2.22-1ubuntu1.11_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

, но когда я пытаюсь найти apache2, он показывает

root@indrajit-MacBookPro:/home/indrajit# which apache2
/usr/sbin/apache2

, как удалить это. Это действительно нужно. Спасибо за вашу помощь

1
задан 23 May 2018 в 15:05

1 ответ

Как уже упоминалось в команде, я решаю проблему, удалив libapache2-mod-fastcgi через apt-get purge libapache2-mod-fastcgi и apache2-suexec через apt-get purge apache2-suexec. наконец

apt-get purge apache2
0
ответ дан 23 May 2018 в 15:05

Другие вопросы по тегам:

Похожие вопросы: