my env is macos M1 core.
php version: 5.6
I done this: brew install libcouchbase and also libcouchbase@2 installed. and I cant install the php couchbase extension.
I treid: pecl install https://pecl.php.net/get/couchbase-2.6.0.tgz
It return:
checking for unistd.h... yes
checking for libcouchbase/couchbase.h... no
./internal.h:57:10: fatal error: 'libcouchbase/couchbase.h' file not found
#include <libcouchbase/couchbase.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
Any ideas? reinstall libcouchbase is not worded.
I solved it!
wget https://pecl.php.net/get/couchbase-2.6.0.tgz
tar -xvf couchbase-2.6.0.tgz
cd couchbase-2.6.0
sudo phpize
sudo./configure --with-php-config=php-config CPPFLAGS="-I/opt/homebrew/Cellar/libcouchbase@2/include" LDFLAGS="-L/opt/homebrew/opt/libcouchbase@2/lib"
sudo make && make install
NOTE: Step 5 is most important!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.