Home >Backend Development >PHP Problem >How to uninstall php extension

How to uninstall php extension

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-09-29 17:29:015363browse

How to uninstall php extension

To uninstall php, using the command yum remove php is not enough, because yum will not help you completely uninstall php. If you use php -v you can find the version of php The number still exists.

How to uninstall php extension

The correct way to uninstall php is: delete the rpm installation package of php (in fact, the yum installation basically still uses the rpm package, but the yum installation can solve the problem of rpm installation) package dependency issues occurred).

How to uninstall php extension

Related recommendations: "php Getting Started Tutorial"

The command is as follows:

#rpm -qa|grep php lists all php related rpm packages

How to uninstall php extension

#rpm -e xxx xxx refers to the package name of the rpm package listed in the previous command, copy That’s it. In this step, uninstall the installed PHP rpm package. Note that errors may occur due to possible dependencies, so you may need to adjust the order of the rpm packages to be written.

How to uninstall php extension

If you adjust the order of rpm packages and still cannot delete the remaining packages, you can solve the problem by force deletion:

#rpm -e xxx -- In nodeps, xxx refers to the rpm package name

How to uninstall php extension

After forced deletion, you can reinstall php:

# yum -y install php You can change the yum source and install other versions of php, because the source of centOS6.6 only provides the source of php5.3.

How to uninstall php extension

The above is the detailed content of How to uninstall php extension. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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