Hi, Sorry for the missing information. I was able to reproduce it with a fresh system by doing the following steps: - Create a VM - Install ubuntu-20.04.1-live-server-amd64.iso -> all standard + openssh -> let the security updates run - install apache2 - install libapache2-mod-python - restart apache2 - the said error is logged in /var/log/apache2/error.log
I noted that during installing libapache2-mod-python there are conflicting Python-versions listet 2.7.17 and 2.7.18. So maybe the error doesn't lie within libapache2-mod-python but within python2 - i can't tell from my point of view. Here is the output during the installing processes: newuser@test-ubuntu:~$ sudo apt update [sudo] password for administrator: Hit:1 http://de.archive.ubuntu.com/ubuntu focal InRelease Hit:2 http://de.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:3 http://de.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:4 http://de.archive.ubuntu.com/ubuntu focal-security InRelease Reading package lists... Done Building dependency tree Reading state information... Done 102 packages can be upgraded. Run 'apt list --upgradable' to see them. newuser@test-ubuntu:~$ sudo apt install apache2 Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libjansson4 liblua5.2-0 ssl-cert Suggested packages: apache2-doc apache2-suexec-pristine | apache2-suexec-custom www-browser openssl-blacklist The following NEW packages will be installed: apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libjansson4 liblua5.2-0 ssl-cert 0 upgraded, 11 newly installed, 0 to remove and 102 not upgraded. Need to get 1865 kB of archives. After this operation, 8080 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://de.archive.ubuntu.com/ubuntu focal/main amd64 libapr1 amd64 1.6.5-1ubuntu1 [91.4 kB] Get:2 http://de.archive.ubuntu.com/ubuntu focal/main amd64 libaprutil1 amd64 1.6.1-4ubuntu2 [84.7 kB] Get:3 http://de.archive.ubuntu.com/ubuntu focal/main amd64 libaprutil1-dbd-sqlite3 amd64 1.6.1-4ubuntu2 [10.5 kB] Get:4 http://de.archive.ubuntu.com/ubuntu focal/main amd64 libaprutil1-ldap amd64 1.6.1-4ubuntu2 [8736 B] Get:5 http://de.archive.ubuntu.com/ubuntu focal/main amd64 libjansson4 amd64 2.12-1build1 [28.9 kB] Get:6 http://de.archive.ubuntu.com/ubuntu focal/main amd64 liblua5.2-0 amd64 5.2.4-1.1build3 [106 kB] Get:7 http://de.archive.ubuntu.com/ubuntu focal-updates/main amd64 apache2-bin amd64 2.4.41-4ubuntu3.1 [1180 kB] Get:8 http://de.archive.ubuntu.com/ubuntu focal-updates/main amd64 apache2-data all 2.4.41-4ubuntu3.1 [158 kB] Get:9 http://de.archive.ubuntu.com/ubuntu focal-updates/main amd64 apache2-utils amd64 2.4.41-4ubuntu3.1 [83.8 kB] Get:10 http://de.archive.ubuntu.com/ubuntu focal-updates/main amd64 apache2 amd64 2.4.41-4ubuntu3.1 [95.5 kB] Get:11 http://de.archive.ubuntu.com/ubuntu focal/main amd64 ssl-cert all 1.0.39 [17.0 kB] Fetched 1865 kB in 0s (4448 kB/s) Preconfiguring packages ... Selecting previously unselected package libapr1:amd64. (Reading database ... 71116 files and directories currently installed.) Preparing to unpack .../00-libapr1_1.6.5-1ubuntu1_amd64.deb ... Unpacking libapr1:amd64 (1.6.5-1ubuntu1) ... Selecting previously unselected package libaprutil1:amd64. Preparing to unpack .../01-libaprutil1_1.6.1-4ubuntu2_amd64.deb ... Unpacking libaprutil1:amd64 (1.6.1-4ubuntu2) ... Selecting previously unselected package libaprutil1-dbd-sqlite3:amd64. Preparing to unpack .../02-libaprutil1-dbd-sqlite3_1.6.1-4ubuntu2_amd64.deb ... Unpacking libaprutil1-dbd-sqlite3:amd64 (1.6.1-4ubuntu2) ... Selecting previously unselected package libaprutil1-ldap:amd64. Preparing to unpack .../03-libaprutil1-ldap_1.6.1-4ubuntu2_amd64.deb ... Unpacking libaprutil1-ldap:amd64 (1.6.1-4ubuntu2) ... Selecting previously unselected package libjansson4:amd64. Preparing to unpack .../04-libjansson4_2.12-1build1_amd64.deb ... Unpacking libjansson4:amd64 (2.12-1build1) ... Selecting previously unselected package liblua5.2-0:amd64. Preparing to unpack .../05-liblua5.2-0_5.2.4-1.1build3_amd64.deb ... Unpacking liblua5.2-0:amd64 (5.2.4-1.1build3) ... Selecting previously unselected package apache2-bin. Preparing to unpack .../06-apache2-bin_2.4.41-4ubuntu3.1_amd64.deb ... Unpacking apache2-bin (2.4.41-4ubuntu3.1) ... Selecting previously unselected package apache2-data. Preparing to unpack .../07-apache2-data_2.4.41-4ubuntu3.1_all.deb ... Unpacking apache2-data (2.4.41-4ubuntu3.1) ... Selecting previously unselected package apache2-utils. Preparing to unpack .../08-apache2-utils_2.4.41-4ubuntu3.1_amd64.deb ... Unpacking apache2-utils (2.4.41-4ubuntu3.1) ... Selecting previously unselected package apache2. Preparing to unpack .../09-apache2_2.4.41-4ubuntu3.1_amd64.deb ... Unpacking apache2 (2.4.41-4ubuntu3.1) ... Selecting previously unselected package ssl-cert. Preparing to unpack .../10-ssl-cert_1.0.39_all.deb ... Unpacking ssl-cert (1.0.39) ... Setting up libapr1:amd64 (1.6.5-1ubuntu1) ... Setting up libjansson4:amd64 (2.12-1build1) ... Setting up ssl-cert (1.0.39) ... Setting up liblua5.2-0:amd64 (5.2.4-1.1build3) ... Setting up apache2-data (2.4.41-4ubuntu3.1) ... Setting up libaprutil1:amd64 (1.6.1-4ubuntu2) ... Setting up libaprutil1-ldap:amd64 (1.6.1-4ubuntu2) ... Setting up libaprutil1-dbd-sqlite3:amd64 (1.6.1-4ubuntu2) ... Setting up apache2-utils (2.4.41-4ubuntu3.1) ... Setting up apache2-bin (2.4.41-4ubuntu3.1) ... Setting up apache2 (2.4.41-4ubuntu3.1) ... 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 module reqtimeout. 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. Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service. Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service. Processing triggers for ufw (0.36-6) ... Processing triggers for systemd (245.4-4ubuntu3.2) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for libc-bin (2.31-0ubuntu9) ... newuser@test-ubuntu:~$ sudo apt install libapache2-mod-python Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libpython2-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib python2 python2-minimal python2.7 python2.7-minimal Suggested packages: libapache2-mod-python-doc python2-doc python-tk python2.7-doc binutils binfmt-support The following NEW packages will be installed: libapache2-mod-python libpython2-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib python2 python2-minimal python2.7 python2.7-minimal 0 upgraded, 9 newly installed, 0 to remove and 102 not upgraded. Need to get 4961 kB of archives. After this operation, 20.5 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libpython2.7-minimal amd64 2.7.18-1~20.04.1 [335 kB] Get:2 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 python2.7-minimal amd64 2.7.18-1~20.04.1 [1285 kB] Get:3 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 python2-minimal amd64 2.7.17-2ubuntu4 [27.5 kB] Get:4 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libpython2.7-stdlib amd64 2.7.18-1~20.04.1 [1887 kB] Get:5 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 python2.7 amd64 2.7.18-1~20.04.1 [248 kB] Get:6 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 libpython2-stdlib amd64 2.7.17-2ubuntu4 [7072 B] Get:7 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 python2 amd64 2.7.17-2ubuntu4 [26.5 kB] Get:8 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libpython2.7 amd64 2.7.18-1~20.04.1 [1038 kB] Get:9 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 libapache2-mod-python amd64 3.3.1-11ubuntu5 [107 kB] Fetched 4961 kB in 1s (4161 kB/s) Selecting previously unselected package libpython2.7-minimal:amd64. (Reading database ... 71841 files and directories currently installed.) Preparing to unpack .../0-libpython2.7-minimal_2.7.18-1~20.04.1_amd64.deb ... Unpacking libpython2.7-minimal:amd64 (2.7.18-1~20.04.1) ... Selecting previously unselected package python2.7-minimal. Preparing to unpack .../1-python2.7-minimal_2.7.18-1~20.04.1_amd64.deb ... Unpacking python2.7-minimal (2.7.18-1~20.04.1) ... Selecting previously unselected package python2-minimal. Preparing to unpack .../2-python2-minimal_2.7.17-2ubuntu4_amd64.deb ... Unpacking python2-minimal (2.7.17-2ubuntu4) ... Selecting previously unselected package libpython2.7-stdlib:amd64. Preparing to unpack .../3-libpython2.7-stdlib_2.7.18-1~20.04.1_amd64.deb ... Unpacking libpython2.7-stdlib:amd64 (2.7.18-1~20.04.1) ... Selecting previously unselected package python2.7. Preparing to unpack .../4-python2.7_2.7.18-1~20.04.1_amd64.deb ... Unpacking python2.7 (2.7.18-1~20.04.1) ... Selecting previously unselected package libpython2-stdlib:amd64. Preparing to unpack .../5-libpython2-stdlib_2.7.17-2ubuntu4_amd64.deb ... Unpacking libpython2-stdlib:amd64 (2.7.17-2ubuntu4) ... Setting up libpython2.7-minimal:amd64 (2.7.18-1~20.04.1) ... Setting up python2.7-minimal (2.7.18-1~20.04.1) ... Linking and byte-compiling packages for runtime python2.7... Setting up python2-minimal (2.7.17-2ubuntu4) ... Selecting previously unselected package python2. (Reading database ... 72588 files and directories currently installed.) Preparing to unpack .../python2_2.7.17-2ubuntu4_amd64.deb ... Unpacking python2 (2.7.17-2ubuntu4) ... Selecting previously unselected package libpython2.7:amd64. Preparing to unpack .../libpython2.7_2.7.18-1~20.04.1_amd64.deb ... Unpacking libpython2.7:amd64 (2.7.18-1~20.04.1) ... Selecting previously unselected package libapache2-mod-python. Preparing to unpack .../libapache2-mod-python_3.3.1-11ubuntu5_amd64.deb ... Unpacking libapache2-mod-python (3.3.1-11ubuntu5) ... Setting up libpython2.7-stdlib:amd64 (2.7.18-1~20.04.1) ... Setting up libpython2.7:amd64 (2.7.18-1~20.04.1) ... Setting up python2.7 (2.7.18-1~20.04.1) ... Setting up libpython2-stdlib:amd64 (2.7.17-2ubuntu4) ... Setting up python2 (2.7.17-2ubuntu4) ... Setting up libapache2-mod-python (3.3.1-11ubuntu5) ... apache2_invoke: Enable module python Processing triggers for libc-bin (2.31-0ubuntu9) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for mime-support (3.64ubuntu1) ... newuser@test-ubuntu:~$ a2enmod python Module python already enabled newuser@test-ubuntu:~$ sudo systemctl restart apache2 newuser@test-ubuntu:~$ cat /var/log/apache2/error.log [Fri Mar 19 16:01:14.370597 2021] [mpm_event:notice] [pid 3359:tid 139860940315712] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations [Fri Mar 19 16:01:14.370927 2021] [core:notice] [pid 3359:tid 139860940315712] AH00094: Command line: '/usr/sbin/apache2' [Fri Mar 19 16:02:35.050897 2021] [mpm_event:notice] [pid 3359:tid 139860940315712] AH00491: caught SIGTERM, shutting down [Fri Mar 19 16:02:35.179712 2021] [:error] [pid 4131:tid 139739005340736] python_init: Python version mismatch, expected '2.7.17', found '2.7.18'. [Fri Mar 19 16:02:35.179922 2021] [:error] [pid 4131:tid 139739005340736] python_init: Python executable found ''. [Fri Mar 19 16:02:35.179939 2021] [:error] [pid 4131:tid 139739005340736] python_init: Python path being used '/lib/python2.7:/lib/python2.7/plat-x86_64-linux-gnu:/lib/python2.7/lib-tk:/lib/python2.7/lib-old:/lib/python2.7/lib-dynload'. [Fri Mar 19 16:02:35.180122 2021] [:notice] [pid 4131:tid 139739005340736] mod_python: Creating 8 session mutexes based on 6 max processes and 25 max threads. [Fri Mar 19 16:02:35.180141 2021] [:notice] [pid 4131:tid 139739005340736] mod_python: using mutex_directory /tmp [Fri Mar 19 16:02:35.217190 2021] [mpm_event:notice] [pid 4131:tid 139739005340736] AH00489: Apache/2.4.41 (Ubuntu) mod_python/3.3.1 Python/2.7.18 configured -- resuming normal operations [Fri Mar 19 16:02:35.217259 2021] [core:notice] [pid 4131:tid 139739005340736] AH00094: Command line: '/usr/sbin/apache2' [Fri Mar 19 16:03:38.147416 2021] [mpm_event:notice] [pid 4131:tid 139739005340736] AH00491: caught SIGTERM, shutting down [Fri Mar 19 16:03:38.309982 2021] [:error] [pid 4500:tid 140557842517056] python_init: Python version mismatch, expected '2.7.17', found '2.7.18'. [Fri Mar 19 16:03:38.310480 2021] [:error] [pid 4500:tid 140557842517056] python_init: Python executable found ''. [Fri Mar 19 16:03:38.310504 2021] [:error] [pid 4500:tid 140557842517056] python_init: Python path being used '/lib/python2.7:/lib/python2.7/plat-x86_64-linux-gnu:/lib/python2.7/lib-tk:/lib/python2.7/lib-old:/lib/python2.7/lib-dynload'. [Fri Mar 19 16:03:38.310679 2021] [:notice] [pid 4500:tid 140557842517056] mod_python: Creating 8 session mutexes based on 6 max processes and 25 max threads. [Fri Mar 19 16:03:38.310702 2021] [:notice] [pid 4500:tid 140557842517056] mod_python: using mutex_directory /tmp [Fri Mar 19 16:03:38.338664 2021] [mpm_event:notice] [pid 4500:tid 140557842517056] AH00489: Apache/2.4.41 (Ubuntu) mod_python/3.3.1 Python/2.7.18 configured -- resuming normal operations [Fri Mar 19 16:03:38.338726 2021] [core:notice] [pid 4500:tid 140557842517056] AH00094: Command line: '/usr/sbin/apache2' -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1919923 Title: mod_python statically linked to wrong python 2.7 version To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-python/+bug/1919923/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs