2014-10-01 78 views
0

我试图安装php-gd.x86_64库时遇到此问题。Centos 7 - 错误:包:php-gd-5.3.3-27.el6_5.2.x86_64(更新)

sudo yum install php-gd.x86_64 

然后我得到了这个错误信息。

Error: Package: php-gd-5.3.3-27.el6_5.2.x86_64 (updates) 
      Requires: php-common(x86-64) = 5.3.3-27.el6_5.2 
      Installed: php-common-5.4.30-1.el6.remi.x86_64 (@remi) 
       php-common(x86-64) = 5.4.30-1.el6.remi 
      Available: php-common-5.3.3-26.el6.x86_64 (base) 
       php-common(x86-64) = 5.3.3-26.el6 
      Available: php-common-5.3.3-27.el6_5.x86_64 (updates) 
       php-common(x86-64) = 5.3.3-27.el6_5 
      Available: php-common-5.3.3-27.el6_5.1.x86_64 (updates) 
       php-common(x86-64) = 5.3.3-27.el6_5.1 
      Available: php-common-5.3.3-27.el6_5.2.x86_64 (updates) 
       php-common(x86-64) = 5.3.3-27.el6_5.2 
You could try using --skip-broken to work around the problem 
You could try running: rpm -Va --nofiles --nodigest 

请指教。谢谢。

+2

它看起来像你已经从一个非标准的回购安装PHP 5.4,通过命名包简单'php'而不是像'php54'的东西来做坏事。这个自定义回购似乎没有提供一个php-gd软件包,并且您的系统*唯一可以找到的php-gd来自回购站,只提供5.3。你已经挖出了一个不错的洞,我建议发布http://superuser.com,因为这与编程无关。 – Sammitch 2014-10-01 23:09:13

回答

1

您已经安装了remi存储库中的php-common软件包。这是一个比CentOS 7更新的版本。CentOS 7包中的php-gd需要CentOS 7的php-common软件包,而不是php-common的remi版本。

你可以看看remi存储库是否有一个php-gd包(虽然我想如果它已经显示出来了),或者你可以删除remi php-common(并且可能还有一些其他包回购)并安装CenOS 7 php-common(及相关)软件包。

或者,您可以尝试重新安装CentOS 7 php-gd源代码版本的php。