【问题标题】:Cannot install rrdtool-php after upgrading from PHP 5.3 to 5.5从 PHP 5.3 升级到 5.5 后无法安装 rrdtool-php
【发布时间】:2013-07-02 21:42:00
【问题描述】:

我正在运行 CentOS 6.4,因此本机坚持使用 PHP 5.3,但我需要 5.5,因此我已在此处使用本指南升级到 5.5,http://www.webtatic.com/packages/php55/

我在安装之前已经删除了所有旧包,现在我已经重新安装了除了“rrdtool-php”包之外的所有东西,这是唯一给我带来一些问题的包。

当我运行它时,我得到了这个错误:

[root@srv install]# yum install rrdtool-php              
Loaded plugins: fastestmirror, replace, security
Loading mirror speeds from cached hostfile
 * base: centos.skarta.net
 * extras: centos.skarta.net
 * updates: mirror.easyspeedy.com
 * webtatic: uk.repo.webtatic.com
Trying other mirror.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rrdtool-php.i686 0:1.3.8-6.el6 will be installed
--> Processing Dependency: php(zend-abi) = 20090626 for package: rrdtool-php-1.3.8-6.el6.i686
--> Processing Dependency: php(api) = 20090626 for package: rrdtool-php-1.3.8-6.el6.i686
--> Running transaction check
---> Package php-common.i686 0:5.3.3-22.el6 will be installed
--> Processing Conflict: php55w-common-5.5.0-1.w6.i386 conflicts php-common < 5.5.0
--> Finished Dependency Resolution
Error: php55w-common conflicts with php-common-5.3.3-22.el6.i686
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我已经安装了“php55w-common”,所以我自然也无法安装“php-common”包。我不敢尝试“--skip-broken”选项,因为我不想让一切都崩溃。

谁能帮我解释一下如何解决这个问题?

【问题讨论】:

    标签: php centos6 rrdtool


    【解决方案1】:

    CentOS/RHEL 6 中的 rrdtool-php 是针对 php 5.3 扩展 api 构建的,因此不能在以后的 PHP 版本(5.4 或 5.5)中使用。

    可以在 PHP 5.5 中创建一个支持这个 php 扩展的包,但这不是我打算为 Webtatic 做的事情,因为不是一个常见的请求。

    如果你觉得它适合你自己,你可以使用 pecl 安装器来代替 php 扩展:

    yum install rrdtool-devel php55w-pear php55w-devel
    pecl install rrd
    echo "extension=rrd.so" > /etc/php.d/rrd.ini
    

    【讨论】:

    • 这对我有用,谢谢! :-) 实际上我现在收到此错误Warning: rrd_graph() expects exactly 2 parameters, 3 given in /home/web/power.php on line 277。我确实有 3 个选项,$ret = rrd_graph("mygraph.rrd", $opts, count($opts));,我可以在文档中看到它只有两个选项,所以我实际上不确定我以前使用的是什么。但这可以解决,您的解决方案为我提供了 PHP 中的 RRDTool 可能性。
    猜你喜欢
    • 1970-01-01
    • 2015-05-20
    • 1970-01-01
    • 1970-01-01
    • 2014-10-13
    • 2017-09-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多