缺少 PHP 包括 (.h)
Missing PHP includes (.h)
我正在尝试为非默认 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: recipe for target 'src/bson.lo' failed
make: *** [src/bson.lo] Error 1
ERROR: `make' failed
我怎样才能摆脱这个?
- OS: Ubuntu 15.10
- PHP版本:5.6.10
- /usr/include没有php.h
- /usr/include/php5/include 没有文件
- 我已经通过 apt-get 安装了 PHP
- 我已经安装并重新安装了php5-dev包
与此处相同的解决方案:尝试在 Ubuntu 上安装 OAuth 但出现错误
安装 PCRE 库(Perl 5 兼容正则表达式库):
# sudo apt-get update
# sudo apt-get install libpcre3 libpcre3-dev
我正在尝试为非默认 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: recipe for target 'src/bson.lo' failed
make: *** [src/bson.lo] Error 1
ERROR: `make' failed
我怎样才能摆脱这个?
- OS: Ubuntu 15.10
- PHP版本:5.6.10
- /usr/include没有php.h
- /usr/include/php5/include 没有文件
- 我已经通过 apt-get 安装了 PHP
- 我已经安装并重新安装了php5-dev包
与此处相同的解决方案:尝试在 Ubuntu 上安装 OAuth 但出现错误
安装 PCRE 库(Perl 5 兼容正则表达式库):
# sudo apt-get update
# sudo apt-get install libpcre3 libpcre3-dev