CouchBase + PHP 安装与配置(Please reinstall the libcouchbase distribution )

安装 CouchBase

安装方法:

pecl install couchbase

报错:

checking for libcouchbase in default path... not found
configure: error: Please reinstall the libcouchbase distribution -
                 libcouchbase.h should be <libcouchbase-dir>/include and
                 libcouchbase.a should be in <libcouchbase-dir>/lib
ERROR: `/tmp/pear/temp/couchbase/configure --with-php-config=/usr/local/php/bin/php-config' failed

报错解决方法,安装 libcouchbase 扩展依赖

wget -O/etc/yum.repos.d/couchbase.repo http://packages.couchbase.com/rpm/couchbase-centos62-x86_64.repo

yum install -y libcouchbase-devel

安装完依赖扩展后,重新安装 couchbase 即可。

安装 CouchBase php 扩展

pecl search couchbase

重启 php-fpm 服务即可。

原文地址:https://www.cnblogs.com/lxwphp/p/15452449.html