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

使用igbinary安装php redis,找不到头文件

发布时间:2020-12-13 21:48:17 所属栏目:PHP教程 来源:网络整理
导读:我正在尝试安装phpredis扩展,但没有运气. 运行命令./configure –enable-redis-igbinary后,我收到以下错误: checking for igbinary includes… configure: error: Cannot find igbinary.h igbinary是使用PECL安装的,但看起来没有找到头文件. 解决方法 此问
我正在尝试安装phpredis扩展,但没有运气.

运行命令./configure –enable-redis-igbinary后,我收到以下错误:

checking for igbinary includes… configure: error: Cannot find igbinary.h

igbinary是使用PECL安装的,但看起来没有找到头文件.

解决方法

此问题可能是由于PECL将头文件安装到与安装phpredis期间使用的位置不同的位置引起的.您可以通过查看控制台消息来确认这一点.

$> sudo pecl install igbinary

Build process completed successfully Installing
‘/usr/lib/php/extensions/no-debug-non-zts-20090626/igbinary.so’
Installing ‘/usr/include/php/ext/igbinary/igbinary.h’

$> ./configure --enable-redis-igbinary

checking for PHP installed headers prefix… /usr/local/include/php
checking if debug is enabled… no checking if zts is enabled… no
checking for re2c… re2c checking for re2c version… 0.13.5 (ok)
checking for gawk… gawk checking whether to enable redis support…
yes,shared checking whether to enable sessions… yes checking
whether to enable igbinary serializer support… yes checking for
igbinary includes… configure: error: Cannot find igbinary.h

只需将igbinary文件夹移动到正确的位置:

$> cp /usr/include/php/ext/igbinary /usr/local/include/php/ext/igbinary -fr

它应该正确找到igbinary头文件:

checking whether to enable igbinary serializer support... yes
checking for igbinary includes... /usr/local/include/php

(编辑:李大同)

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

    推荐文章
      热点阅读