Is it possible to upgrade php5.6 to 7.4 on Debian 8?
I'm trying to upgrade php5.6 to 7.4 on Debian 8, and I'm having a difficult time doing this. Is Debian 8 too old for php 7.4?
3 Replies
I tried to install it on a Debian 8 Linode I spun up. I performed some Google-Fu and tried several repositories with no such luck. When I tried to install it, here is what I ended up with:
sudo apt install php7.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.4 : Depends: libapache2-mod-php7.4 but it is not going to be installed or
php7.4-fpm but it is not going to be installed or
php7.4-cgi but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I'm leaning towards that Debian 8 might be too old for this, but I'd like to ask members of our wonderful Community: Is there a proper work around for this, or is it easier to upgrade to Debian 9 or 10?
Ondřej Surý is the best source for PHP, Apache and Nginx packages on Debian and Ubuntu.
He’s the packager of the official Debian and Ubuntu PHP packages.
Even his repository only has Stretch and Buster (9 and 10) available.
EDIT: Yep, Debian 8 was EOL 30th June 2020 and support was dropped last month and the repositories recently removed.
If you can find a way to absolve the dependency on libapache2-mod-php7.4, you can do that. libapache-mod-php7.4 ONLY works with the prefork MPM so if you use a threaded MPM (any of the rest of them), you can't use it anyway.
Since @andysh has already investigated Ondrej Sury's ppa's for you, the other alternative would be to compile it from source. This is probably what I would do…
Beware that you are going to be fixing lots of bugs/incompatibilities in your PHP code base when you move it to 7.4.
-- sw