php7.4 in ubuntu 21.10: apache2 fails to start

Viewed 2102

I try to run php7.4 in ubuntu 21.10 but I get this error.

apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.4.load: Cannot load /usr/lib/apache2/modules/libphp7.4.so into server: /usr/lib/apache2/modules/libphp7.4.so: cannot open shared object file: No such file or directory

Missing libphp7.4.so

I installed libphp7.4-embed but the problem persists. The files are installed in /usr/lib/ not in /usr/lib/apache2/modules/. Symbolic link did not help (undefined symbol: php7_module).

How to make php7.4 run in ubuntu 21.10?

I try some commands

$ sudo a2enconf php7.4-fpm

Conf php7.4-fpm already enabled
$ sudo a2enmod php7.4-fpm

ERROR: Module php7.4-fpm does not exist!
1 Answers

after much try and error: rm /etc/apache2/mods-enabled/php7.4.load

Now it works.

(there is only one php* in mods-enabled: php7.4.conf. I don't know if it matters.)

Related