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

我正在尝试安装phpredis扩展程序,但没有运气。</ p>

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


检查igbinary 包括... configure:错误:找不到igbinary.h </ p>
</ blockquote>

使用PECL安装了igbinary,但看起来没有找到头文件。</ p >
</ div>

展开原文

原文

I'm trying to install the phpredis extension, but no luck.

After running the command ./configure --enable-redis-igbinary, I've received the following error:

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

igbinary was installed using PECL, but looks like the header files are not being found.

1个回答

This problem is probably caused because PECL is installing the header files to a location different from the one that is used during the installation of phpredis. You can confirm this by looking at the console messages.

$> 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

Just move the igbinary folder to the correct location:

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

And it should correctly find the igbinary header file:

checking whether to enable igbinary serializer support... yes
checking for igbinary includes... /usr/local/include/php
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐