0

I'm trying to install php-memcached (with php8.1) but have the following error:

# apt install php-memcached
Reading package lists... Done
Building dependency tree... Done
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:
 php-memcached : Depends: phpapi-20190902
E: Unable to correct problems, you have held broken packages.

I updated apt and tried apt install phpapi-20190902 but that gives:

Package phpapi-20190902 is a virtual package provided by:
  php7.4-phpdbg 7.4.26-1
  php7.4-fpm 7.4.26-1
  php7.4-cli 7.4.26-1
  php7.4-cgi 7.4.26-1
  libphp7.4-embed 7.4.26-1
  libapache2-mod-php7.4 7.4.26-1
You should explicitly select one to install.

E: Package 'phpapi-20190902' has no installation candidate

That are php7.4 packages when I am using php 8.1 (debian buster). I tried apt install php8.1-fpm which instaled fine but still have the same issue. I'm a bit lost.

Entretoize
  • 113
  • 1
  • 6
  • If the command `apt install php8.1-fpm` works and finds the correct packages, have you tried to run `apt install php8.1-memcached`? You could also try `apt search php8.1 | grep memcache` to see if there is a different package name. I could not find any `php8.1` packages in the Debian Buster repository, so if you need more specific help you would need to tell us which repository you are installing PHP from. – GracefulRestart Jan 04 '22 at 17:49
  • apt doesn't find php8.1-memcached, grep find a `php8.1-memcache/unstable 8.0+4.0.5.2+3.0.9~20170802.e702b5f9+-7 amd64` but not a memcached. I'm not sure about the packages, there's backports and sid in sources.list – Entretoize Jan 06 '22 at 10:48

1 Answers1

0

It seems like you are installing php8.1 from the sid repository.

The sid repository has the package php8.1-memcache which is described as "memcache extension module for PHP"

If that is what you are looking for, you should install it and see if it delivers what you were expecting. If that is not what you are looking for, you should clarify your question with more information.

GracefulRestart
  • 4,421
  • 1
  • 9
  • 10
  • That does not help installing memcached but as memcache is nearly the same Iaccept the answer. Thanks – Entretoize Jan 07 '22 at 08:42
  • If you want the PHP module to interface with `memcached` then you would install `php8.1-memcache`. If you want to install the `memcached` service, you should install `memcached`: `apt install memcached`. – GracefulRestart Jan 07 '22 at 19:29