brew install libmemcached
brew install zlib
Find installed locations:
brew --cellar
#/opt/homebrew/Cellar
ls /opt/homebrew/Cellar/libmemcached/
#1.0.18_2
ls /opt/homebrew/Cellar/zlib/
#1.2.12
Install memcached using pecl:
pecl install memcached
#libmemcached directory [no] : /opt/homebrew/Cellar/libmemcached/1.0.18_2/
#zlib directory [no] : /opt/homebrew/Cellar/zlib/1.2.12
#use system fastlz [no] :
#enable igbinary serializer [no] :
#enable msgpack serializer [no] :
#enable json serializer [no] :
#enable server protocol [no] :
#enable sasl [yes] :
#enable sessions [yes] :
pecl download memcache-4.0.5.2
cd memcache-4.0.5.2/memcache-4.0.5.2/
phpize
./configure --with-zlib-dir=/opt/homebrew/Cellar/zlib/1.2.12/
make
make test
sudo make install
nano /opt/homebrew/etc/php/7.4/php.ini
# add extension="memcache.so"
php -m | grep memca
#memcache
#memcached
Done.
The only solution that worked!
Thanks