php-config is not installed

I installed php7.1, php-config is in /usr/local/php/bin, also I can execute php-config anywhere. I download phalcon by git and execute the command sudo ./install. But I got this error: php-config is not installed.

sudo will execute with the root user, does the root user also see the php-config executable?

# su root
# which php-config

You can also set a specific path for the php-config: (

git clone
# cd cphalcon/build/php5/32bits
cd cphalcon/build/php5/64bits

# NOTE: for PHP 7 you have to use
# cd cphalcon/build/php7/32bits
# or
# cd cphalcon/build/php7/64bits

make clean
/opt/php-5.6.15/bin/phpize --clean

export CFLAGS="-O2 --fvisibility=hidden"
./configure --with-php-config=/opt/php-5.6.15/bin/php-config --enable-phalcon

make install