Mac - php redis install
Table of Contents
#
Mac - php redis install
##
Mac Env
Mac OSX 10.14.5
##
Step
git clone https://www.github.com/phpredis/phpredis.git
cd phpredis
phpize && ./configure && make && sudo make install
test
php -r "if (new Redis() == true){ echo \"\r\n OK \r\n\"; }"
##
Troubleshooting
###
phpize
1.
$ phpize
grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
Solution
cd /Library/Developer/CommandLineTools/Packages/
open macOS_SDK_headers_for_macOS_10.14.pkg
2.
$ phpize
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.
Solution
brew install autoconf
Refer - install-phpredis-mac-osx