Yum remove php failed solution: 1. Force deletion through the "#rpm -qa|grep php" command; 2. Modify the correct uninstallation sequence; 3. Check deletion through "#php -v" The situation is enough.
The operating environment of this article: linux5.9.8 system, PHP5.1.6 version, DELL G3 computer
Check the php version command:
#php -v
This command is not clean for deletion
#yum remove php
Because after using this command, you will still see the version information if you use it again
#php -v
. . . . .
Must be forcibly deleted
#rpm -qa|grep php
The prompt is as follows
#php-pdo-5.1.6-27.el5_5.3 #php-mysql-5.1.6-27.el5_5.3 #php-xml-5.1.6-27.el5_5.3 #php-cli-5.1.6-27.el5_5.3 #php-common-5.1.6-27.el5_5.3 #php-gd-5.1.6-27.el5_5.3
Be careful to uninstall the ones without dependencies first
pdo is a dependency of mysql; common is a dependency of gd Dependencies;
例如:# rpm -e php-pdo-5.1.6-27.el5_5.3 error: Failed dependencies: php-pdo is needed by (installed) php-mysql-5.1.6-27.el5_5.3.i386
So the correct uninstall sequence is:
# rpm -e php-mysql-5.1.6-27.el5_5.3 # rpm -e php-pdo-5.1.6-27.el5_5.3 # rpm -e php-xml-5.1.6-27.el5_5.3 # rpm -e php-cli-5.1.6-27.el5_5.3 # rpm -e php-gd-5.1.6-27.el5_5.3 # rpm -e php-common-5.1.6-27.el5_5.3
Reuse # php -v
There is no prompt to view the version information
Install the latest PHP
wget tar xzvf php-5.3.6.tar.gz cd php-5.3.6 ./configure --prefix=/usr/local/php
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What to do if yum remove php fails. For more information, please follow other related articles on the PHP Chinese website!