加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

缺少PHP包括(.h)

发布时间:2020-12-13 21:55:05 所属栏目:PHP教程 来源:网络整理
导读:我正在尝试为非默认的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 ^compilatio
我正在尝试为非默认的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

我怎么能摆脱这个?

>操作系统:Ubuntu 15.10
> PHP版本:5.6.10
> /usr/include没有php.h
> /usr/include / php5 / include没有文件
>我通过apt-get安装了PHP
>我已经安装并重新安装了php5-dev软件包

解决方法

与此处相同的解决方案: Attempting to install OAuth on Ubuntu but getting errors

安装PCRE库(Perl 5兼容的正则表达式库):

# sudo apt-get update
# sudo apt-get install libpcre3 libpcre3-dev

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读