Make PHP7 and PHP 8 live together
I've upgraded from PHP 7 to PHP 8. As it's usually the case with PHP, I still have php7.4 in
/usr/bin (alongside with php8.0). But, when I run the
php -v command, it answers php8.0.
Since then, when trying to install software (for example Docker and VirtualBox), I get the error message
php7.4-fpm.service: Failed with result 'exit-code', followed by
Failed to start The PHP 7.4 FastCGI Process Manager. It seems therefore that I need php7.4 to run to install such applications.
But I use PHP 8 functionalities to code a website and therefore don't want to get back to php7.4
Is there a way to use php8.0 and php7.4 at the same time? I could make PHP 8 work on a virtual machine but it's quite heavy.
I'm on Ubuntu 20 (but I'm not sure that this problem is OS-specific).