无法在 centos 上安装 php-devel

2022-08-30 22:31:53

我需要安装php-devel的帮助(我需要它,因为它有phpize,这是安装eAccelerator所必需的)。但是当我尝试安装php-devel时,它会给我以下错误:yum install php-devel

# yum install php-devel
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: centos.itt-consulting.com
 * epel: mirror.yandex.ru
 * extras: centos.itt-consulting.com
 * passenger: mirror.hmdc.harvard.edu
 * updates: centos.itt-consulting.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-devel.x86_64 0:5.3.3-14.el6_3 will be installed
--> Processing Dependency: php = 5.3.3-14.el6_3 for package: php-devel-5.3.3-14.el6_3.x86_64
--> Finished Dependency Resolution
Error: Package: php-devel-5.3.3-14.el6_3.x86_64 (updates)
           Requires: php = 5.3.3-14.el6_3
           Installed: php-5.4.6-1.el6.remi.x86_64 (@remi-test)
               php = 5.4.6-1.el6.remi
           Available: php-5.3.3-3.el6_2.8.x86_64 (base)
               php = 5.3.3-3.el6_2.8
           Available: php-5.3.3-14.el6_3.x86_64 (updates)
               php = 5.3.3-14.el6_3
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

我不知道如何处理这些错误。我已经安装了php 5.3.3(phpinfo()说),所以不明白为什么在这个列表中我可以看到Installed: php-5.4...


答案 1

您需要运行的不是运行。yum install php-develyum --enablerepo=remi,remi-php54 install php-devel

简而言之,只需指定您想要从 remi 存储库中获取哪个 php 开发版本。在你的情况下,你已经从remi安装了php54,所以你需要添加“remi-php54”。这将在没有停机时间的情况下成功安装php-devel。


答案 2

我所做的是:

yum search php53

它显示了要安装的php-devel文件。一旦我进行了搜索并找到了正确的devel软件包,我就简单地在yum安装后复制并粘贴了整个名称。我执行了

yum install php53-devel.x86_64

得到它


推荐