Apache Apache/2.4.41 (Ubuntu) не запускается.

Вопрос или проблема

Я не могу запустить Apache после обновления Python, вот моя конфигурация

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal

python3 --version
Python 3.8.10

apachectl -t
Syntax OK

apachectl -v
Server version: Apache/2.4.41 (Ubuntu)
Server built:   2024-07-17T18:58:09

apachectl -l
Compiled in modules:
  core.c
  mod_so.c
  mod_watchdog.c
  http_core.c
  mod_log_config.c
  mod_logio.c
  mod_version.c
  mod_unixd.c 

В настоящее время я использую LiteSpeed в качестве временного решения. Я хотел переустановить Apache и удалить все файлы конфигурации из-за следующего вывода 
httpd -V
httpd_ls_bak: Syntax error on line 28 of /etc/apache2/conf/httpd.conf: Syntax error on line 2 of /etc/apache2/conf.modules.d/005_mod_cgid.conf: Cannot load modules/mod_cgid.so into server: /etc/apache2/modules/mod_cgid.so: undefined symbol: ap_set_content_type_ex
Server version: Apache/2.4.58 (cPanel)
Server built:   Nov 21 2023 00:00:00
Server's Module Magic Number: 20120211:129
Server loaded:  APR 1.7.5, APR-UTIL 1.6.3, PCRE 10.34 2019-11-21
Compiled using: APR 1.7.4, APR-UTIL 1.6.3, PCRE 10.34 2019-11-21
Architecture:   64-bit
Server MPM:     worker
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/apache2"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

Однако, когда я запускаю 

apt update
----------

Hit & Get response deleted
Fetched 525 kB in 3s (155 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
44 packages can be upgraded. Run 'apt list --upgradable' to see them.

что выглядит хорошо, но когда я выполняю sudo apt upgrade :

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 ea-apache24-mod-cgid : Depends: ea-apache24 (>= 0:2.4.62-3) but 2.4.62-2+3.2.cpanel is installed
                        Depends: ea-apache24-mmn (>= 20120211x8664)
 ea-apache24-mod-deflate : Depends: ea-apache24 (>= 0:2.4.62-3) but 2.4.62-2+3.2.cpanel is installed
                           Depends: ea-apache24-mmn (>= 20120211x8664)
 ea-apache24-mod-expires : Depends: ea-apache24 (>= 0:2.4.62-3) but 2.4.62-2+3.2.cpanel is installed
                           Depends: ea-apache24-mmn (>= 20120211x8664)
 ea-apache24-mod-headers : Depends: ea-apache24 (>= 0:2.4.62-3) but 2.4.62-2+3.2.cpanel is installed
                           Depends: ea-apache24-mmn (>= 20120211x8664)
 ea-apache24-mod-mpm-worker : Depends: ea-apache24 (>= 0:2.4.62-3) but 2.4.62-2+3.2.cpanel is installed
                              Depends: ea-apache24-mmn (>= 20120211x8664)
 ea-apache24-mod-proxy : Depends: ea-apache24 (>= 0:2.4.62-3) but 2.4.62-2+3.2.cpanel is installed
                         Depends: ea-apache24-mmn (>= 20120211x8664)
 ea-apache24-mod-proxy-fcgi : Depends: ea-apache24 (>= 0:2.4.62-3) but 2.4.62-2+3.2.cpanel is installed
                              Depends: ea-apache24-mmn (>= 20120211x8664)
 ea-apache24-mod-proxy-http : Depends: ea-apache24 (>= 0:2.4.62-3) but 2.4.62-2+3.2.cpanel is installed
                              Depends: ea-apache24-mmn (>= 20120211x8664)
 ea-apache24-mod-proxy-wstunnel : Depends: ea-apache24 (>= 0:2.4.62-3) but 2.4.62-2+3.2.cpanel is installed
                                  Depends: ea-apache24-mmn (>= 20120211x8664)
 ea-apache24-mod-ssl : Depends: ea-apache24 (>= 0:2.4.62-3) but 2.4.62-2+3.2.cpanel is installed
                       Depends: ea-apache24-mmn (>= 20120211x8664)
 ea-apache24-mod-suexec : Depends: ea-apache24 (>= 0:2.4.62-3) but 2.4.62-2+3.2.cpanel is installed
                          Depends: ea-apache24-mmn (>= 20120211x8664)
 ea-apache24-mod-suphp : Depends: ea-apache24-mmn (>= 20120211)
 ea-apache24-mod-unique-id : Depends: ea-apache24 (>= 0:2.4.62-3) but 2.4.62-2+3.2.cpanel is installed
                             Depends: ea-apache24-mmn (>= 20120211x8664)
 python3.12-venv : Depends: python3.12 (= 3.12.8-1+focal1) but 3.12.7-1+focal1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

и когда я выполняю 

apt --fix-broken 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:
  libpython3.12-minimal python3.12-minimal
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  ea-apache24 ea-apache24-tools libpython3.12-stdlib python3.12
The following packages will be upgraded:
  ea-apache24 ea-apache24-tools libpython3.12-stdlib python3.12
4 upgraded, 0 newly installed, 0 to remove and 41 not upgraded.
94 not fully installed or removed.
Need to get 0 B/7554 kB of archives.
After this operation, 13.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
usermod: no changes
usermod: no changes
(Reading database ... 239897 files and directories currently installed.)
Preparing to unpack .../ea-apache24-tools_2.4.62-3+7.1.cpanel_amd64.deb ...
Unpacking ea-apache24-tools (2.4.62-3+7.1.cpanel) over (2.4.62-2+3.2.cpanel) ...
dpkg: error processing archive /var/cache/apt/archives/ea-apache24-tools_2.4.62-3+7.1.cpanel_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/ab', which is also in package apache2-utils 2.4.41-4ubuntu3.21
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../ea-apache24_2.4.62-3+7.1.cpanel_amd64.deb ...
Unpacking ea-apache24 (2.4.62-3+7.1.cpanel) over (2.4.62-2+3.2.cpanel) ...
dpkg: error processing archive /var/cache/apt/archives/ea-apache24_2.4.62-3+7.1.cpanel_amd64.deb (--unpack):
 trying to overwrite '/usr/sbin/apachectl', which is also in package apache2 2.4.41-4ubuntu3.21
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
chmod: cannot access '/etc/apache2/logs/suexec_log': No such file or directory
chown: cannot access '/etc/apache2/logs/suexec_log': No such file or directory
chmod: cannot access '/var/log/apache2/suexec_log': No such file or directory
chown: cannot access '/var/log/apache2/suexec_log': No such file or directory
Preparing to unpack .../python3.12_3.12.8-1+focal1_amd64.deb ...
xargs: memory exhausted
Unpacking python3.12 (3.12.8-1+focal1) over (3.12.7-1+focal1) ...
dpkg: error processing archive /var/cache/apt/archives/python3.12_3.12.8-1+focal1_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/python3.12', which is also in package python3.12-minimal 3.12.7-1+focal1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../libpython3.12-stdlib_3.12.8-1+focal1_amd64.deb ...
xargs: memory exhausted
Unpacking libpython3.12-stdlib:amd64 (3.12.8-1+focal1) over (3.12.7-1+focal1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.12-stdlib_3.12.8-1+focal1_amd64.deb (--unpack):
 trying to overwrite '/etc/python3.12/sitecustomize.py', which is also in package libpython3.12-minimal:amd64 3.12.7-1+focal1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/ea-apache24-tools_2.4.62-3+7.1.cpanel_amd64.deb
 /var/cache/apt/archives/ea-apache24_2.4.62-3+7.1.cpanel_amd64.deb
 /var/cache/apt/archives/python3.12_3.12.8-1+focal1_amd64.deb
 /var/cache/apt/archives/libpython3.12-stdlib_3.12.8-1+focal1_amd64.deb
needrestart is being skipped since dpkg has failed
Ignoring current entry for “ea-php54” …
Ignoring current entry for “ea-php55” …
Ignoring current entry for “ea-php56” …
Ignoring current entry for “ea-php70” …
Ignoring current entry for “ea-php71” …
Ignoring current entry for “ea-php72” …
Ignoring current entry for “ea-php73” …
Ignoring current entry for “ea-php74” …
Ignoring current entry for “ea-php80” …
Ensuring current entry for “ea-php81” is correct …
Ensuring current entry for “ea-php82” is correct …
Processing ea-php81 …
        … moving zend_extension and extension directives from php.ini to php.d/zzzzzzz-pecl.ini …
Processing ea-php82 …
        … moving zend_extension and extension directives from php.ini to php.d/zzzzzzz-pecl.ini …
Service Status
        Found 1 versions of PHP-FPM: 81

Apache PHP-FPM 81(php-fpm: master process (/opt/cpanel/ea-php81/root/etc/php-fpm.conf)) is running as root with PID “2716927” (process table check method)

apache_php_fpm restarted successfully.
[Sun Jan  5 17:30:53 2025] [100-phpfpm_cleanup] [ea-php81-php-fpm] No need to clean user files since we are installing.
[Sun Jan  5 17:30:54 2025] [100-phpfpm_cleanup] [ea-php82-php-fpm] No need to clean user files since we are installing.
usermod: no changes
usermod: no changes
Purging all relevant cached command results
Removing:  /root/.cpanel/datastore/_usr_sbin_httpd_-l
Removing:  /root/.cpanel/datastore/_usr_sbin_httpd_-v
Removing:  /root/.cpanel/datastore/_usr_sbin_httpd_-V
Rebuilding global cache
Building global cache for cpanel...httpd_ls_bak: Syntax error on line 28 of /etc/apache2/conf/httpd.conf: Syntax error on line 2 of /etc/apache2/conf.modules.d/005_mod_cgid.conf: Cannot load modules/mod_cgid.so into server: /etc/apache2/modules/mod_cgid.so: undefined symbol: ap_set_content_type_ex
Done
Ignoring current entry for “ea-php54” …
Ignoring current entry for “ea-php55” …
Ignoring current entry for “ea-php56” …
Ignoring current entry for “ea-php70” …
Ignoring current entry for “ea-php71” …
Ignoring current entry for “ea-php72” …
Ignoring current entry for “ea-php73” …
Ignoring current entry for “ea-php74” …
Ignoring current entry for “ea-php80” …
Ensuring current entry for “ea-php81” is correct …
Ensuring current entry for “ea-php82” is correct …
info [modsec_cpanel_conf_init] The modsec2.cpanel.conf file and its datastore are already set up. No further action is required.
Initial configuration generation failed with the following message:

The “/usr/sbin/httpd -DSSL -t -f /etc/apache2/conf/httpd.conf.work.50419a2c.cfgcheck -C Include "/etc/apache2/conf.modules.d/*.conf"” command (process 2716971) reported error number 1 when it ended.
httpd_ls_bak: Syntax error in -C/-c directive: Syntax error on line 2 of /etc/apache2/conf.modules.d/005_mod_cgid.conf: Cannot load modules/mod_cgid.so into server: /etc/apache2/modules/mod_cgid.so: undefined symbol: ap_set_content_type_ex

Rebuilding configuration without any local modifications.

Failed to generate a syntactically correct Apache configuration.
Bad configuration file located at /etc/apache2/conf/httpd.conf.work.50419a2c
Error:
The “/usr/sbin/httpd -DSSL -t -f /etc/apache2/conf/httpd.conf.work.50419a2c.cfgcheck -C Include "/etc/apache2/conf.modules.d/*.conf"” command (process 2716974) reported error number 1 when it ended.
httpd_ls_bak: Syntax error in -C/-c directive: Syntax error on line 2 of /etc/apache2/conf.modules.d/005_mod_cgid.conf: Cannot load modules/mod_cgid.so into server: /etc/apache2/modules/mod_cgid.so: undefined symbol: ap_set_content_type_ex

!!!! “/etc/apt/universal-hooks/multi_pkgs/Post-Invoke/ea-__WILDCARD__/020-rebuild-httpdconf --pkg_list=\/tmp\/apt\.dd21b5f6e064842623e0e4e1503f0c18\.txn\-pkgs” did not exit cleanly: 65280
Nothing to do under ea4 (this script has been deprecated under ea4).
Fix mailman package directories …
 … PID 2716986
Fix mailing list perms …
 … PID 2716988
Aligning modsec config to Whostmgr
- Whostmgr version 11.118.0.29
- Whostmgr supports conf.d/modsec location
- No change necessary
warn [restartsrv_httpd] The system is unable to find systemd configuration for the 'httpd' service...
Waiting for “httpd” to stop ……Gracefully terminating process: litespeed (lshttpd - main) with pid 2708994 and owner root.
Gracefully terminating process: litespeed (lshttpd - #01) with pid 2709000 and owner nobody.
Waiting for 2708994,2709000 to shutdown ....................................................................................................................................................................... terminating 2708994,2709000 ..... terminated.
…finished.

Startup Log
        2025-01-05 17:03:53.535783 [NOTICE] [T0] Memory size is: 8123576KB.
        [OK] litespeed: pid=2708994.

Log Messages
        2025-01-05 17:30:56.494015 [NOTICE] [2708994] [T0] SIGTERM received, shutdown disabled, turn off fake Apache httpd.

httpd stopped successfully.
warn [restartsrv_httpd] The system is unable to find systemd configuration for the 'httpd' service...
Waiting for “httpd” to start ……waiting for “httpd” to initialize ………finished.

Service Status
        httpd (httpd (lscgid)) is running as root with PID 2717101 (pidfile+/proc check method).

Startup Log
        2025-01-05 17:31:03.234085 [NOTICE] [T0] Memory size is: 8123576KB.
        [OK] litespeed: pid=2717096.

Log Messages
        [Sun Jan  5 17:31:03 2025] [notice] Finish reading Apache configuration, server configured -- resuming normal operations
        2025-01-05 17:31:03.296756 [INFO] [2717096] [T0] [/etc/apache2/conf/httpd.conf:367] User home: /nonexistent, vhost doc_root: /var/www/html/, does not overlap.
        2025-01-05 17:31:03.296264 [INFO] [2717096] [T0] [/etc/apache2/conf/httpd.conf:862] User home: /nonexistent, vhost doc_root: /var/www/html/, does not overlap.
        2025-01-05 17:31:03.294763 [INFO] [2717096] [T0] [/etc/apache2/conf/httpd.conf:723] User home: /nonexistent, vhost doc_root: /var/www/html/, does not overlap.
        2025-01-05 17:31:03.294056 [INFO] [2717096] [T0] [/etc/apache2/conf/httpd.conf:614] User home: /nonexistent, vhost doc_root: /var/www/html/, does not overlap.
        2025-01-05 17:31:03.290698 [INFO] [2717096] [T0] [/etc/apache2/conf/httpd.conf:337] User home: /nonexistent, vhost doc_root: /var/www/html/, does not overlap.
        2025-01-05 17:31:03.290651 [INFO] [2717096] [T0] [/etc/apache2/conf/httpd.conf:316] User home: /nonexistent, vhost doc_root: /var/www/html/, does not overlap.
        2025-01-05 17:31:03.290260 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/includes/post_virtualhost_2.conf
        2025-01-05 17:31:03.290246 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/includes/post_virtualhost_global.conf
        2025-01-05 17:31:03.290182 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/userdata/lscache_vhosts.conf
        2025-01-05 17:31:03.290147 [INFO] [2717096] [T0] Processing config directory: /etc/apache2/conf.d/userdata
        2025-01-05 17:31:03.289733 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/userdata/lscache_vhosts.conf
        2025-01-05 17:31:03.289708 [INFO] [2717096] [T0] Processing config directory: /etc/apache2/conf.d/userdata
        2025-01-05 17:31:03.289632 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/includes/pre_virtualhost_2.conf
        2025-01-05 17:31:03.289613 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/includes/pre_virtualhost_global.conf
        2025-01-05 17:31:03.289263 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/includes/errordocument.conf
        2025-01-05 17:31:03.288764 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/includes/account_suspensions.conf
        2025-01-05 17:31:03.288277 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/php_add_handler_fix.conf
        2025-01-05 17:31:03.288251 [NOTICE] [2717096] [T0] [/etc/apache2/conf.d/php.conf:31] Ignore Action config for 'application/x-httpd-ea-php81'
        2025-01-05 17:31:03.288229 [NOTICE] [2717096] [T0] [/etc/apache2/conf.d/php.conf:22] Ignore Action config for 'application/x-httpd-ea-php82'
        2025-01-05 17:31:03.288223 [NOTICE] [2717096] [T0] [/etc/apache2/conf.d/php.conf:17] Ignore Action config for 'application/x-httpd-ea-php82'
        2025-01-05 17:31:03.288215 [NOTICE] [2717096] [T0] [/etc/apache2/conf.d/php.conf:16] Ignore Action config for 'application/x-httpd-ea-php81'
        2025-01-05 17:31:03.288149 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/php.conf
        2025-01-05 17:31:03.287706 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/modsec/modsec2.cpanel.conf
        2025-01-05 17:31:03.287628 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/modsec/modsec2.user.conf
        2025-01-05 17:31:03.286771 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/modsec2.conf
        2025-01-05 17:31:03.286284 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/http2.conf
        2025-01-05 17:31:03.285617 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/cperror.conf
        2025-01-05 17:31:03.285145 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/cgid.conf
        2025-01-05 17:31:03.284532 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/autoindex.conf
        2025-01-05 17:31:03.284066 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/00-suphp.conf
        2025-01-05 17:31:03.284018 [INFO] [2717096] [T0] Processing config directory: /etc/apache2/conf.d
        2025-01-05 17:31:03.283984 [INFO] [2717096] [T0] [/etc/apache2/conf/httpd.conf:268] try to add listener: '[::]:443'.
        2025-01-05 17:31:03.283966 [INFO] [2717096] [T0] [/etc/apache2/conf/httpd.conf:267] try to add listener: '*:443'.
        2025-01-05 17:31:03.283933 [INFO] [2717096] [T0] [/etc/apache2/conf/httpd.conf:235] try to add listener: '[::]:80'.
        2025-01-05 17:31:03.283882 [INFO] [2717096] [T0] [/etc/apache2/conf/httpd.conf:234] try to add listener: '*:80'.
        2025-01-05 17:31:03.281180 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/includes/pre_main_2.conf
        2025-01-05 17:31:03.280601 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.d/includes/pre_main_global.conf
        2025-01-05 17:31:03.280080 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/90-suphp.conf
        2025-01-05 17:31:03.279586 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/800-mod_security2.conf
        2025-01-05 17:31:03.279112 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/495_mod_ssl.conf
        2025-01-05 17:31:03.278740 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/490_mod_bwlimited.conf
        2025-01-05 17:31:03.278364 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/460_mod_userdir.conf
        2025-01-05 17:31:03.277912 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/455_mod_unixd.conf
        2025-01-05 17:31:03.277513 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/450_mod_unique_id.conf
        2025-01-05 17:31:03.277017 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/445_mod_suexec.conf
        2025-01-05 17:31:03.276724 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/435_mod_status.conf
        2025-01-05 17:31:03.276385 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/420_mod_socache_shmcb.conf
        2025-01-05 17:31:03.276035 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/410_mod_socache_dbm.conf
        2025-01-05 17:31:03.275736 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/405_mod_slotmem_shm.conf
        2025-01-05 17:31:03.275387 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/395_mod_setenvif.conf
        2025-01-05 17:31:03.274888 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/385_mod_rewrite.conf
        2025-01-05 17:31:03.274473 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/350_mod_proxy_wstunnel.conf
        2025-01-05 17:31:03.273528 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/340_mod_proxy_http.conf
        2025-01-05 17:31:03.272846 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/325_mod_proxy_fcgi.conf
        2025-01-05 17:31:03.272466 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/280_mod_proxy.conf
        2025-01-05 17:31:03.272117 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/275_mod_negotiation.conf
        2025-01-05 17:31:03.271843 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/265_mod_mime.conf
        2025-01-05 17:31:03.271606 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/250_mod_logio.conf
        2025-01-05 17:31:03.271361 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/235_mod_log_config.conf
        2025-01-05 17:31:03.271019 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/225_mod_include.conf
        2025-01-05 17:31:03.270622 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/215_mod_headers.conf
        2025-01-05 17:31:03.270240 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/210_mod_filter.conf
        2025-01-05 17:31:03.269841 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/195_mod_expires.conf
        2025-01-05 17:31:03.269488 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/180_mod_dir.conf
        2025-01-05 17:31:03.269068 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/170_mod_deflate.conf
        2025-01-05 17:31:03.268743 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/110_mod_autoindex.conf
        2025-01-05 17:31:03.268349 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/105_mod_authz_user.conf
        2025-01-05 17:31:03.267991 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/095_mod_authz_host.conf
        2025-01-05 17:31:03.267750 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/090_mod_authz_groupfile.conf
        2025-01-05 17:31:03.267490 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/075_mod_authz_core.conf
        2025-01-05 17:31:03.267236 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/065_mod_authn_file.conf
        2025-01-05 17:31:03.266963 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/045_mod_authn_core.conf
        2025-01-05 17:31:03.266683 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/035_mod_auth_basic.conf
        2025-01-05 17:31:03.266226 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/020_mod_alias.conf
        2025-01-05 17:31:03.265743 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/015_mod_actions.conf
        2025-01-05 17:31:03.265416 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/010_mod_access_compat.conf
        2025-01-05 17:31:03.265401 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/005_mod_cgid.conf
        2025-01-05 17:31:03.265385 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/000_mod_systemd.conf
        2025-01-05 17:31:03.265361 [INFO] [2717096] [T0] Processing config file: /etc/apache2/conf.modules.d/000_mod_mpm_worker.conf
        2025-01-05 17:31:03.265254 [INFO] [2717096] [T0] Processing config directory: /etc/apache2/conf.modules.d
        2025-01-05 17:30:56.494015 [NOTICE] [2708994] [T0] SIGTERM received, shutdown disabled, turn off fake Apache httpd.

httpd started successfully.
Setting /home permissions to 0711 …
Setting permissions for users …
airaccess …
… Done
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я не знаю, как действовать дальше, и буду признателен за любые советы.

Ответ или решение

Для начала, давайте проанализируем проблему. Ваша инсталляция Apache Apache/2.4.41 на Ubuntu 20.04.4 LTS не запускается после обновления Python. Вы также указали, что используете LiteSpeed в качестве временного решения, однако желаете восстановить работу Apache. Проблема побеждена различными несоответствиями в зависимостях пакетов и ошибками конфигурации, как видно из ваших выводов команд.

Анализ проблемы

  1. Ошибка синтаксиса в конфигурации Apache:

    • Ошибка загрузки модуля mod_cgid.so из-за неопределенного символа ap_set_content_type_ex.
    • Это может быть вызвано несовместимостью версии модуля и основного пакета Apache.
  2. Проблемы с пакетами:

    • Множество незакрытых зависимостей и конфликтов пакетов. Например, конфликты пакета ea-apache24-tools с apache2-utils и ea-apache24 с apache2.
  3. Обновления и зависимости:

    • Несоответствие между версиями пакетов Apache и их зависимостей приводит к ошибкам во время обновления и установки.
  4. Запуск команды исправления проблем с зависимостями:

    • apt --fix-broken install не решает проблему полностью.

Шаги по устранению проблемы

  1. Удаление конфликтующих пакетов:

    • Первая задача — удалить все конфликтующие или нестабильные пакеты Apache. Для этого выполните:
      sudo apt remove --purge apache2 ea-apache24 ea-apache24-tools
  2. Очистка и исправление зависимостей:

    • После удаления пакетов необходимо очистить и повторно попытаться установить необходимые пакеты:
      sudo apt autoremove
      sudo apt update
      sudo apt --fix-broken install
  3. Переустановка Apache:

    • Установите Apache заново с очищенной конфигурацией:
      sudo apt install apache2
  4. Ручная проверка конфигурационных файлов:

    • Убедитесь, что старые файлы конфигурации не остались на сервере и не конфликтуют с вновь установленными. Проверьте директории /etc/apache2/conf.modules.d/, /etc/apache2/sites-available/, и /etc/apache2/sites-enabled/.
  5. Работа с Python:

    • Убедитесь, что используемая версия Python совместима с побочными зависимостями сервера. Возможно, ранее обновление Python стало катализатором проблем, поэтому убедитесь, что все зависимости Python установлены правильно:
      sudo apt install python3.8-venv
  6. Проверка синтаксиса и проверка конфигурации после переустановки:

    • Выполните:
      apachectl configtest
    • Убедитесь, что вывод не содержит ошибок, и перезапустите Apache:
      sudo systemctl restart apache2
  7. Мониторинг и исправление ошибок:

    • Если возникнут дальнейшие ошибки, анализируйте лог-файлы Apache, которые расположены в /var/log/apache2/error.log, для более детальной отладки.

Предоставленные рекомендации должны помочь стабилизировать работу Apache. Однако, любой пакет или зависимость могут иметь дополнительные специфичные для системы или использования особенности, которые могут потребовать дальнейшего исследования. Приведенные шаги приведены для устранения большинства типичных проблем, возникающих в результате конфликтов между пакетами и конфигурациями, особенно в системах на основе Ubuntu.

Оцените материал
Добавить комментарий

Капча загружается...