0%

mac下php-memcached扩展

phpize是用来扩展php扩展模块的,通过phpize可以建立php的外挂模块。

  1. 下载 wget http://pecl.php.net/get/memcached-2.2.0.tgz
  2. 解压 tar -zxvf memcached-2.2.0.tgz
  3. /path/phpize
  4. ./configure –with-php-config=/path/php-config
    • configure: error: memcached support requires libmemcached. Use –with-libmemcached-dir= to specify the prefix where libmemcached headers and library are located
  5. brew install libmemcached,macOS 10.14.4安装完一般都在/usr/local/Cellar目录下对应的扩展下面
  6. ./configure –with-php-config=/path/php-config –with-libmemcached-dir=/path/libmemecached
  7. make && make install