是用旧模块编译的

是用旧模块编译的

本文介绍了PEAR 声称 php 是用旧模块编译的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚升级到 php 5.6.4.当我对各种软件包进行梨形安装时,它会抱怨模块不匹配.

I just upgraded to php 5.6.4. When i do pear installs of various packages it complains that if have a module mismatch.

示例:

sudo pecl install xdebug
Failed loading /usr/local/php-5.6.4/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so:
/usr/local/php-5.6.4/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so: undefined symbol: zend_execute_ex
Zend OPcache requires Zend Engine API version 220131226.
The Zend Engine API version 220100525 which is installed, is outdated.

PHP Warning:  PHP Startup: PDFlib: Unable to initialize module
Module compiled with module API=20131226
PHP    compiled with module API=20100525

但是,我相信 20131226 是 php 5.6.4,20100525 是 5.4.所以奇怪的是 pear 认为这些模块是用 5.6 编译的,但 php 的版本是 5.4.在模块比 php 版本旧很多的地方,我已经有了这个,通常只是重新编译这些模块.这个我有点难住了.

However, 20131226 is php 5.6.4, 20100525 is 5.4 i believe. So oddly pear thinks the modules were compiled w/ 5.6 but the version of php is 5.4. Ive had this the other way around where the module is older than the php version a lot and typically just recompile those module. this one im a bit stumped.

[richv]$ php -v
PHP 5.6.4 (cli) (built: Jun 16 2015 16:08:30)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
    with Xdebug v2.3.2, Copyright (c) 2002-2015, by Derick Rethans
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies

[richv]$ pear version
PEAR Version: 1.9.5
PHP Version: 5.6.4
Zend Engine Version: 2.6.0
Running on: Linux dragon 3.10.0-229.4.2.el7.x86_64 #1 SMP Wed May 13 10:06:09 UTC 2015 x86_64

推荐答案

如果您仍然使用旧的 php 版本,那么 pear/pecl 可能仍在使用这个 php 版本 - 即使它在 梨版.

If you still have the old php version lying around, then pear/pecl probably still uses this php version - even if it shows the correct php version in pear version.

尝试更改 php_bin pear 配置设置:

Try to change the php_bin pear config setting:

$ pear config-show
..
$ pear config-set php_bin /path/to/new/php

这篇关于PEAR 声称 php 是用旧模块编译的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 19:23