0

memcached docker installation works in Debian 11, but it fails in Debian 12

RUN apt-get update && apt-get install -y libmemcached-dev zlib1g-dev \
&& pecl install memcached \
&& docker-php-ext-enable memcached 
...
checking for libmemcached location... configure: error: memcached support requires libmemcached. Use --with-libmemcached-dir=<DIR> to specify the prefix where libmemcached headers and library are located
ERROR: `/tmp/pear/temp/memcached/configure --with-php-config=/usr/local/bin/php-config --with-libmemcached-dir=no --with-zlib-dir=no --with-system-fastlz=no --enable-memcached-igbinary=no --enable-memcached-msgpack=no --enable-memcached-json=no --enable-memcached-protocol=no --enable-memcached-sasl=yes --enable-memcached-session=yes' failed

# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

# php -v
PHP 8.1.20 (cli) (built: Jun 14 2023 05:48:10) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.20, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.20, Copyright (c), by Zend Technologies

How is possible to install it?

s0rin
  • 127
  • 1
  • 9
  • Similar issues: https://stackoverflow.com/questions/76490445/problem-adding-memcached-support-in-docker-for-php8-1-using-bookworm https://serverfault.com/questions/1134001/memcached-support-requires-libmemcached – s0rin Jul 04 '23 at 14:09
  • The memcached error will disappear if libssl-dev is installed also, see https://serverfault.com/questions/1134001/memcached-support-requires-libmemcached – s0rin Aug 14 '23 at 14:05

0 Answers0