Home >Backend Development >PHP Problem >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.
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).
Related recommendations: "php Getting Started Tutorial"
The command is as follows:
#rpm -qa|grep php lists all php related rpm packages
#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.
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
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.
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!