![Yum 无法安装 php 插件](https://linux22.com/image/681993/Yum%20%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%20php%20%E6%8F%92%E4%BB%B6.png)
我在使用 phpmyadmin 时遇到了问题,所以我卸载了 php 及其所有插件并重新安装,但 yum 抱怨无法安装 php-common:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.funet.fi
* epel: mirror.yandex.ru
* extras: ftp.funet.fi
* updates: ftp.funet.fi
Resolving Dependencies
--> Running transaction check
---> Package php-common.x86_64 0:5.4.16-36.el7_1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================================================================
Installing:
php-common x86_64 5.4.16-36.el7_1 base 563 k
Transaction Summary
=============================================================================================================================================================================================================================================
Install 1 Package
Total download size: 563 k
Installed size: 3.8 M
Is this ok [y/d/N]: y
Downloading packages:
php-common-5.4.16-36.el7_1.x86_64.rpm | 563 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : php-common-5.4.16-36.el7_1.x86_64 1/1
Error unpacking rpm package php-common-5.4.16-36.el7_1.x86_64
error: unpacking of archive failed on file /etc/php.d/curl.ini: cpio: rename
Verifying : php-common-5.4.16-36.el7_1.x86_64 1/1
Failed:
php-common.x86_64 0:5.4.16-36.el7_1
Complete!
答案1
通过删除 /etc/php.d 解决了该问题