我正在尝试让mamcache工作.使用https://hub.docker.com/_/php/中的示例(PECL扩展).
我的dockerfile简单做了下一步:
FROM php:5.6-apache RUN apt-get update && apt-get install -y libmemcached-dev \ && pecl install memcached \ && docker-php-ext-enable memcached
但最后我得到了下一个:
checking for zlib location... configure: error: memcached support requires ZLIB. Use --with-zlib-dir=to specify the prefix where ZLIB headers and library are located ERROR: `/tmp/pear/temp/memcached/configure --with-php-config=/usr/local/bin/php-config --with-libmemcached-dir=no' failed error: /usr/local/lib/php/extensions/no-debug-non-zts-20131226/memcached does not exist usage: /usr/local/bin/docker-php-ext-enable [options] module-name [module-name ...] ie: /usr/local/bin/docker-php-ext-enable gd mysqli /usr/local/bin/docker-php-ext-enable pdo pdo_mysql /usr/local/bin/docker-php-ext-enable --ini-name 0-apc.ini apcu apc Possible values for module-name: opcache.so
我做错了什么?
您需要安装zlib
开发包.添加zlib1g-dev
(不是100%确定包名称 - 如果它不起作用则注释)到apt-get install
命令.