douhuai2015 2016-02-27 12:02
浏览 238
已采纳

无法在PHP5.6-apache容器中安装memcached包

I'm trying to get mamcache working. Using example from https://hub.docker.com/_/php/ (PECL extensions).

My dockerfile simple does next:

 FROM php:5.6-apache

 RUN apt-get update && apt-get install -y libmemcached-dev \
 && pecl install memcached \ 
 && docker-php-ext-enable memcached

But finally I got next:

checking for zlib location... configure: error: memcached support requires ZLIB. Use --with-zlib-dir=<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

What do I do wrong ?

  • 写回答

1条回答 默认 最新

  • dongshiran7000 2016-02-27 12:08
    关注

    You need to install zlib development package. Add zlib1g-dev (not 100% sure for the package name — comment if it doesn't work) to the apt-get install command.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 vb net 使用 sendMessage 如何输入鼠标坐标
  • ¥200 求能开发抖音自动回复卡片的软件
  • ¥15 关于freesurfer使用freeview可视化的问题
  • ¥100 谁能在荣耀自带系统MagicOS版本下,隐藏手机桌面图标?
  • ¥15 求SC-LIWC词典!
  • ¥20 有关esp8266连接阿里云
  • ¥15 C# 调用Bartender打印机打印
  • ¥15 我这个代码哪里有问题 acm 平台上显示错误 90%,我自己运行好像没什么问题
  • ¥50 C#编程中使用printDocument类实现文字排版打印问题
  • ¥15 找会编程的帅哥美女 可以用MATLAB里面的simulink编程,用Keil5编也可以。