缺少PHP包含(.h)
我正在尝试为非默认PHP二进制位置安装PHP扩展mongodb。我正在使用PECL:缺少PHP包含(.h),php,mongodb,header-files,php-extension,Php,Mongodb,Header Files,Php Extension,我正在尝试为非默认PHP二进制位置安装PHP扩展mongodb。我正在使用PECL: sudo pecl install mongodb 经过长时间的记录,我得到了这个 /tmp/pear/temp/mongodb/src/bson.c:29:17: fatal error: php.h: No such file or directory #include <php.h> ^ compilation terminated. Makefile:338: rec
sudo pecl install mongodb
经过长时间的记录,我得到了这个
/tmp/pear/temp/mongodb/src/bson.c:29:17: fatal error: php.h: No such file or directory
#include <php.h>
^
compilation terminated.
Makefile:338: recipe for target 'src/bson.lo' failed
make: *** [src/bson.lo] Error 1
ERROR: `make' failed
/tmp/pear/temp/mongodb/src/bson.c:29:17:致命错误:php.h:没有这样的文件或目录
#包括
^
编译终止。
Makefile:338:目标'src/bson.lo'的配方失败
make:**[src/bson.lo]错误1
错误:`make'失败
我怎样才能摆脱这个
- 操作系统:Ubuntu 15.10
- PHP版本:5.6.10
- /usr/include没有php.h
- /usr/include/php5/include没有文件
- 我已经通过apt-get安装了PHP
- 我已经安装并重新安装了php5开发包
当您尝试手动安装它时会发生什么?它正在编译,但不工作。我有一个错误:
PHP警告:PHP启动:无法加载动态库'./mongodb.so'-./mongodb.so:未定义的符号:第0行未知的全局文件
是否进行了phpize?这基本上是说,您编译的php版本与您运行的php版本不同。是的,我尝试了不同版本的phpize,包括5.6.10,并捆绑在php独立版本中
# sudo apt-get update
# sudo apt-get install libpcre3 libpcre3-dev