Not able to install php memcache

1.5k views Asked by At

When I run brew install php56-memcache I get the following error.

checking whether to enable memcache session handler support... yes
checking for the location of ZLIB... no
checking for the location of zlib... configure: error: memcache support
requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB 
include and library are located

I have zlib in brew list.

autoconf    jpeg        memcached   php56       ruby-build
freetype    libevent    mhash       php56-igbinary  unixodbc
gettext     libmemcached    mysql       php56-memcached vim
git     libpng      node        pkg-config  zlib
icu4c       mcrypt      openssl     rbenv

I tried `bbrew install php56-memcache --with-zlib-dir=/usr/local/Cellar/zlib/1.2.8' but it gives the same error.

I tried a manual way, ./configure, make, make install, but the result is the same.

How can I install memcache?

2

There are 2 answers

0
shin On

I run the followings and it is installed.

brew link --force zlib
brew install php56-memcache
0
m.khamash On

This did the trick for me [#1637], just run

xcode-select --install
brew install php{xx}-memcache