PHP 7 installation Sphinx encountered a pit

First of all, there is no problem with the first half of the installation according to this method online:

Address: https://www.cnblogs.com/xi-jie/articles/10476860.html

[root@centos7-2 ~]# cd /usr/local/src

[root @ centos7-2 SRC] # wget HTTP: / / http://sphinxsearch.com/files/sphinx-2.2.10-release.tar.gz

[root@centos7-2 SRC]# tar-zxvf sphinx-2.2.10-release.tar.gz

[root @ centos7-2 SRC] # CD sphinx – 2.2.10 – release

[root@centos7-2 sphinx-2.2.10-release]#./configure –prefix=/usr/local/sphinx –with-mysql

[root@centos7-2 sphinx-2.2.10-release]# make && make install

The installation relies on LibSphinxClient

[root @ centos7-2 sphinx – 2.2.10 – release] # API CD/libsphinxclient

[root@centos7-2 libsphinxclient]# ./configure –prefix=/usr/local/sphinx

[root@centos7-2 libsphinxclient]# make && make install

But wait until you install the PHP Sphinx module

Need to download the support php7 sphinx module, download page in the http://pecl.php.net/package/sphinx did not find support php7 module. Click [Browse Source]

Go to the page and find the php7 module

I’m a bit stupid and use the browser to download tar.gz

Then continue to

[root@centos7-2 src]# tar -zxvf sphinx-d958afb.tar.gz

[root@centos7-2 src]# cd sphinx-d958afb/

[root@centos7-2 sphinx-d958afb]# phpize

Can’t find PHP headers in /usr/include/php

The php-devel package is required for use of this command.

PHP -devel is not installed

[root@centos7-2 sphinx-d958afb]# yum install php71w-devel

[root@centos7-2 sphinx-d958afb]# phpize

Configuring for:

PHP Api Version:         20160303

Zend Module Api No:      20160303

Zend Extension Api No:   320160303

[root@centos7-2 sphinx-d958afb]# ./configure –with-php-config=/usr/bin/php-config –with-sphinx=/usr/local/sphinx/

[root@centos7-2 sphinx-d958afb]# make && make install