Search code examples
debianmemcachedaptdebphp-7.4

Debian PHP 7.4 - package php-memcached depend of php7.3 (debian 10)


After installing php 7.4 :

apt-get install libapache2-mod-php7.4 php-common php-geoip php-igbinary php-msgpack php-redis php7.4 php7.4-cli php7.4-common php7.4-curl php7.4-gd php7.4-gmp php7.4-intl php7.4-json php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-readline php7.4-soap php7.4-sqlite3 php7.4-xml php7.4-zip

I try to install php-memcached, but the old version is installed (php 7.3) :

apt-get install php-memcached

...

Les NOUVEAUX paquets suivants seront installés :

php-memcached php7.3-cli php7.3-common php7.3-json php7.3-opcache php7.3-phpdbg php7.3-readline

... We can see that's not Php7.4 but php7.3 needed for this extension

cat /etc/apt/sources.list.d/php.list

deb https://packages.sury.org/php/ buster main

cat /etc/apt/sources.list

deb http://ftp2.fr.debian.org/debian buster main non-free contrib
deb-src http://ftp2.fr.debian.org/debian buster main non-free contrib

deb http://security.debian.org/ buster/updates main contrib non-free
deb-src http://security.debian.org/ buster/updates main contrib non-free

How to force php-memcached to install for PHP 7.4 ?

i've try php7.4-memcached but it's not working There is not folder/file in /etc/php/7.4 in module

My code is not working : Uncaught Error: Class 'Memcached' not found


Debian 10 (and sid) package php-memcached 3.1.3 depend on "phpapi-20180731" (Php 7.3) : https://packages.debian.org/fr/buster/php-memcached

Only the new version will be compatible with php 7.4 :

https://pecl.php.net/package/memcached/3.1.4

For now packages.sury give only php-memcached 3.1.3

https://packages.sury.org/php/pool/main/p/php-memcached/


Solution

  • Now it's working, packages.sury upgrade memcached package