make -j 4编译时报错【php7.1.7 centos7.5】
hawk140 opened this issue · 1 comments
make -j 4编译时报错【php7.1.7 centos7.5】,标错信息如下
[ 10%] [ 20%] Building CXX object CMakeFiles/phpx.dir/src/array.o
[ 30%] Building CXX object CMakeFiles/phpx.dir/src/base.o
Building CXX object CMakeFiles/phpx.dir/src/class.o
In file included from /root/PHP-X/src/array.cc:19:0:
/root/PHP-X/include/phpx.h:23:17: fatal error: php.h: No such file or directory
#include "php.h"
^
compilation terminated.
[ 40%] In file included from /root/PHP-X/src/class.cc:19:0:
/root/PHP-X/include/phpx.h:23:17: fatal error: php.h: No such file or directory
#include "php.h"
^
compilation terminated.
Building CXX object CMakeFiles/phpx.dir/src/exec.o
In file included from /root/PHP-X/src/base.cc:19:0:
/root/PHP-X/include/phpx.h:23:17: fatal error: php.h: No such file or directory
#include "php.h"
^
compilation terminated.
make[2]: *** [CMakeFiles/phpx.dir/src/array.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /root/PHP-X/src/exec.cc:19:0:
/root/PHP-X/include/phpx.h:23:17: fatal error: php.h: No such file or directory
#include "php.h"
^
compilation terminated.
make[2]: *** [CMakeFiles/phpx.dir/src/class.o] Error 1
make[2]: *** [CMakeFiles/phpx.dir/src/base.o] Error 1
make[2]: *** [CMakeFiles/phpx.dir/src/exec.o] Error 1
make[1]: *** [CMakeFiles/phpx.dir/all] Error 2
make: *** [all] Error 2
1,检查一下php-config命令是否存在,不存在的话直接到PHP sbin目录里面做软链接ln -s /usr/local/php/bin/php-config /usr/bin/php-config
2,删掉cmakecache.txt,重新编译一次