What to do if yum remove php fails

藏色散人
Release: 2023-03-10 09:08:02
Original
2710 people have browsed it

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.

What to do if yum remove php fails

The operating environment of this article: linux5.9.8 system, PHP5.1.6 version, DELL G3 computer

Check the php version command:

#php -v
Copy after login
Copy after login

This command is not clean for deletion

#yum remove php
Copy after login

Because after using this command, you will still see the version information if you use it again

#php -v
Copy after login
Copy after login

. . . . .

Must be forcibly deleted

#rpm -qa|grep php
Copy after login

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
Copy after login

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
Copy after login

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
Copy after login

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
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template