This problem has been encountered before, remember the last is to download the source package to specify the path, and today the new installation environment results must try, because I know that as long as the installation of this Libmemcached-devdev package must have a header file, the results finally through the query data really let me find, This procedure is documented below
Install dependencies first to compile the installation
sudo apt-get install libmemcached libmemcached-dev
pecl download memcached
tar zxvf memcached.tar.gz
CD memcached
phpize
./configure--with-libmemcached-dir= This directory can use the following command to find
Dpkg-l Libmemcached-dev | grep memcached.h
/USR/INCLUDE/LIBMEMCACHED-1.0/MEMCACHED.HPP
/usr/include/libmemcached-1.0/struct/memcached.h
/usr/ Include/libmemcached-1.0/memcached.h
/usr/include/libmemcached/memcached.hpp
/usr/include/libmemcached /memcached.h
So obviously saw the Memcached.h file, then the path is written/usr/include/libmemcached but not, guaranteed wrong
./configure--with-libmemcached-dir=/usr/include/libmemcached
checking for libmemcached location ... configure: Error:unable to find Memcached.h under/u/weiz/libmemcached-1.0.16
By viewing
https://github.com/php-memcached-dev/php-memcached/blob/master/config.m4#L277
Can see
if test! -F "$PHP _libmemcached_dir/include/libmemcached/memcached.h";
It turned out that he was going to this path include/libmemcached/under Look, no wonder wrong
Next Execute
sudo mkdir-p/usr/lib/x86_64-linux-gnu/include/libmemcached
sudo ln-s/usr/include/libmemcached/memcached.h/ Usr/lib/x86_64-linux-gnu/include/libmemcached/memcached.h
Then it's done.
sudo./configure--with-php-config=/usr/local/php/bin/php-config--enable-memcached--with-libmemcached-dir=/usr/ Lib/x86_64-linux-gnu--DISABLE-MEMCACHED-SASL
sudo make
sudo make install