Open OlafvdSpek opened 3 years ago
I haven't really found a solution for this yet - the php
package pulls php8.0
which pulls one of the web SAPIs and libapache2-mod-php8.0
is first on the list, so it gets picked up by apt
dependency solver.
I would be happy to hear any ideas how to solve this without breaking any other expectations. Even if I changed the order to have php8.0-fpm
or php8.0-cgi
as a first SAPI on the list, I would get the other kind of bugreports about php8.0-fpm
being installed while they are running apache2
.
Perhaps simply dropping php
and phpX.Y
packages might be best solution?
Doesn't Apache support FPM yet? Prefering fpm over libapache2-mod-php8.0 would be good for me, but as you said maybe not for others. At least it wouldn't install a web server... Apt's resolver seems sub-optimal as well, as it's installing php8.0-fpm anyway. Do other packages depend on php or on php-common? Wouldn't the same problem occur with php-common?
Yes, Apache2 does support FPM.
I think php-common
pulls only php-cli
, so no not really.
Dropping php
would be also suboptimal as there are packages that doesn't require a specific webserver, but they need web enabled SAPI:
$ grep-dctrl -F Depends php, -s Package /var/lib/apt/lists/*Packages | sort -u
Package: adminer
Package: cacti
Package: dokuwiki
Package: dtc-common
Package: fusiondirectory
Package: ganglia-webfrontend
Package: gosa
Package: homer-api
Package: hoteldruid
Package: icingaweb2-module-businessprocess
Package: icingaweb2-module-director
Package: libsoup2.4-tests
Package: loganalyzer
Package: nagvis
Package: oar-web-status
Package: ocsinventory-reports
Package: openstack-cluster-installer
Package: php-cas
Package: phpldapadmin
Package: phpqrcode
Package: postfixadmin
Package: simplesamlphp
Package: slbackup-php
Package: wordpress
Package: zabbix-frontend-php
Package: zoph
I would be happy if we found a solution to this, but so far I'm like 🤷
What about a virtual php
package?
-fpm
and libapache2-mod-
would provide it, but as it's virtual apt wouldn't install it automatically. Or maybe it would..
Maybe apt maintainers could be asked for advice?
BTW, I don't see phpmyadmin
in that list, did they solve it differently?
Maybe apt maintainers could be asked for advice?
I would appreciate if you could do that.
BTW, I don't see phpmyadmin in that list, did they solve it differently?
I think they pull it via transitive dependency, the Depends list contains quite a lot of different php dependencies.
I've observed this same issue (or a very similar one, with likely the same fix), with nginx. Upstream seems to have fixed the issue pointed out in the comment above mine.
Steps to reproduce:
nginx
, mariadb-server
, and then php-fpm
from Debian repos, installed already, avoiding the apache dependency here.update
, apt upgrade
Note that it upgrades php-fpm to the latest on the repo, and tries to install, presumably one of php-8.3
or php
as a dependency or upgrade - which now tries to drag in apache2
as a dependency.
The working workaround for me, is to:
sudo apt upgrade
, only sudo apt update
sudo apt install php[version]-fpm
- replace [version]
with the version of PHP you're installing.apache
is not among them.sudo apt upgrade
. Note that apache
is no longer in the list.It is important to install php-fpm
first! for each new version (including minor version upgrades, which have a new package name and supersede the prior in upgrade) before any other PHP packages upgrades or installs, otherwise Apache will be installed and configured. It sucks that this is a two-step procedure now, but it is how it is.
It is also important, if you have (an) existing PHP install(s), that after adding the repo and key, and doing the first apt update
, that you install/upgrade the corresponding php-fpm
versions for your version of PHP first, before running the general apt upgrade
or installing or upgrading other PHP packages.
@OlafvdSpek does following this order of operations help keep Apache at bay on your end?
I think it does, but that's what I call a workaround, not a solution.
I don't disagree, I'll change that wording.
This seems undesirable...
Debian 10.8