R
R
Roman Kutenko2020-01-17 12:52:12
PHP
Roman Kutenko, 2020-01-17 12:52:12

How to install memcache extension (php72, macos Catalina)?

Good day to all!
Trying to install memcache extension for php72 on mac os catalina and getting the following error! zlib installed

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
ERROR: `/private/tmp/pear/temp/memcache/configure --with-php-config=/usr/local/opt/[email protected]/bin/php-config --enable-memcache-session=yes' failed

I try
pecl install memcache --with-zlib-dir=/usr/local/Cellar/zlib/1.2.11/include/zlib.h

But
Attempting to discover channel "--with-zlib-dir=/usr/local/Cellar/zlib/1.2.11/include"...
Attempting fallback to https instead of http on channel "--with-zlib-dir=/usr/local/Cellar/zlib/1.2.11/include"...
unknown channel "--with-zlib-dir=/usr/local/Cellar/zlib/1.2.11/include" in "--with-zlib-dir=/usr/local/Cellar/zlib/1.2.11/include/zlib.h"
invalid package name/package file "--with-zlib-dir=/usr/local/Cellar/zlib/1.2.11/include/zlib.h"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kutenko, 2021-12-23
@Sky4eg

Once again I stumble upon my own question)))
Here is the solution

pecl download memcache
open memcache-4.0.5.2.tgz  
cd memcache-4.0.5.2/memcache-4.0.5.2
phpize
locate zlib.h 
./configure --with-zlib-dir=/opt/homebrew/Cellar/zlib/1.2.11
make
sudo make install

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question