docker-library / php

Docker Official Image packaging for PHP
https://php.net
MIT License
3.84k stars 2k forks source link

Memcached installation error in php:8.1-apache #1418

Closed adrianc111 closed 1 year ago

adrianc111 commented 1 year ago

Description From yesterday we started getting an error when building docker containers, specifically when installing memcached with the command RUN install-php-extensions memcached but the same happens with pecl install memcached.

configure: error: memcached support requires libmemcached. Use --with-libmemcached-dir=

The suggested attribute --with-libmemcached-dir=<DIR> doesn't fix it and throws an error as if the file didn't existed in the provided location.

unable to locate header file memcached.h**

Steps to replicate

Workaround The workaround for now is to use php:8.1.9-apache instead of php:8.1-apache

TimWolla commented 1 year ago

ref https://github.com/php/php-src/issues/11452

AdamKatzDev commented 1 year ago

I've also encountered the same issue in 7.4.

That is probably somehow related to the recent Debian PR. https://github.com/docker-library/php/pull/1416 As a workaround use 8.1-fpm-bullseye, 8.1-bullseye, 7.4-bullseye, etc.

yosifkit commented 1 year ago

Yup, it seems there is a bug with the libmemcached package in bookworm. The pkg-config file has this content:

root@e3b27f5cf8f8:/# cat /usr/lib/x86_64-linux-gnu/pkgconfig/libmemcached.pc
...
Requires:  libsasl2
Requires.private:  libcrypto

So the libmemcached package is missing a dependency on libssl-dev that provides libcrypto. Adding libssl-dev to the apt-get install will fix the error.

digilopment commented 1 year ago

Hi, I have the same issue, unfortunately yesterday I reported here (with description and reported versions) https://github.com/php/php-src/issues/11452 Thank you.

tianon commented 1 year ago

I filed the bug against the Debian package appropriately: https://bugs.debian.org/1038149