安装GD之后的PHP问题

新的PHP。 安装的WordPress(目前运行最新版本),并注意到我无法操纵WPpipe理员中的图像大小。 谷歌searchbuild议我需要GD安装。

我在一个只运行我的博客的CentOS VPS。 虽然我宁愿不让它崩溃,但我在尝试学习时确实冒了一些风险。

我做的第一件事是yum install php-gd ,它给了我:

Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-gd-5.1.6-27.el5_5.3.i386 (base)

然后,我发现了一个链接(对不起,但我找不到它),build议做:

rpm -e --justdb --nodeps php-common

那样做了,然后yum install php-gd再次yum install php-gd 。 这一次它工作(w00t!)。

但是当我做一个php -m ,我得到:

PHP Warning: PHP Startup: dbase: Unable to initialize module Module compiled with module API=20050922 PHP compiled with module API=20090626 These options need to match in Unknown on line 0

我重新启动了Apache,并且在启动过程中在error_log中看到了同样的错误。

不幸的是,我现在在这个时候已经有点不在意了。 那么,我一直都是这样,但是到现在为止一直都乐意在任何事情上摇摆不定。 希望我已经提供了足够的信息(而不是太多)。 如果有人有任何想法,我会很高兴听到他们。 我现在可以做些什么来让GD正常运行?

啊,最后一点… php --version给我:

PHP Warning: PHP Startup: dbase: Unable to initialize module Module compiled with module API=20050922 PHP compiled with module API=20090626 These options need to match in Unknown on line 0 PHP 5.3.6 (cli) (built: May 16 2011 19:18:00) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

你破了东西 看起来你已经从CentOS 6安装了部分PHP,并且安装了CentOS 5的其他部分 – 升级过程非常糟糕,极其错误,或者你已经添加了一些你不应该拥有的yum版本库。

你可以花费很长的时间试图把这些碎片重新组合起来(也许最后会有一个永远微妙地被破坏的系统),或者只是推土机,然后再获得一个新系统 – 而这次你确实打破了,不要。 如果你没有在系统上运行任何东西,我肯定会去后者。

而protip:任何涉及迫使你的软件包pipe理器做一些不想做的事情(比如使用rpm --nodeps )是不应该在没有成人监督的情况下做的事情。 就像这个男人说的,“不要在家里试试这个!”