The result of repeated installation of php on centos7 cannot be uninstalled.

Source: Internet
Author: User
After centos7 was repeatedly installed with php, it was finally impossible to uninstall and install php. after that, some yum install php-pdo php-zip files were excerpted on the Internet. as a result, php cannot be uninstalled or reinstalled.
If you use yum install php, the system prompts that the installation is complete. However, php-v prompts that the error does not exist.

The entire process:
[root@localhost conf.d]# whereis phpphp:[root@localhost conf.d]# yum remove phpLoaded plugins: fastestmirrorNo Match for argument: phpNo Packages marked for removal[root@localhost conf.d]# clear[root@localhost conf.d]# whereis phpphp:[root@localhost conf.d]# yum remove phpLoaded plugins: fastestmirrorNo Match for argument: phpNo Packages marked for removal[root@localhost conf.d]# rpm -qa | grep phpphp-cli-5.4.16-23.el7_0.x86_64php-pdo-5.4.16-23.el7_0.x86_64php-odbc-5.4.16-23.el7_0.x86_64php-snmp-5.4.16-23.el7_0.x86_64php-mbstring-5.4.16-23.el7_0.x86_64php-common-5.4.16-23.el7_0.x86_64php-process-5.4.16-23.el7_0.x86_64php-xml-5.4.16-23.el7_0.x86_64php-gd-5.4.16-23.el7_0.x86_64php-ldap-5.4.16-23.el7_0.x86_64php-soap-5.4.16-23.el7_0.x86_64php-xmlrpc-5.4.16-23.el7_0.x86_64[root@localhost conf.d]# yum install phpLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.linode.com * extras: mirrors.linode.com * updates: mirrors.linode.comResolving Dependencies--> Running transaction check---> Package php.x86_64 0:5.4.16-23.el7_0 will be installed--> Finished Dependency ResolutionDependencies Resolved================================================================================ Package      Arch            Version                    Repository        Size================================================================================Installing: php          x86_64          5.4.16-23.el7_0            updates          1.3 MTransaction Summary================================================================================Install  1 PackageTotal download size: 1.3 MInstalled size: 4.4 MIs this ok [y/d/N]: yDownloading packages:php-5.4.16-23.el7_0.x86_64.rpm                             | 1.3 MB   00:00Running transaction checkRunning transaction testTransaction test succeededRunning transactionWarning: RPMDB altered outside of yum.  Installing : php-5.4.16-23.el7_0.x86_64                                   1/1  Verifying  : php-5.4.16-23.el7_0.x86_64                                   1/1Installed:  php.x86_64 0:5.4.16-23.el7_0Complete![root@localhost conf.d]# php -v-bash: php: command not found[root@localhost conf.d]# php -i-bash: php: command not found[root@localhost conf.d]#


Reply to discussion (solution)

Point the bin in the php installation directory to ln xx/usr/bin.

You can try to uninstall it like this:

Rpm-qa | grep phprpm-e [package output above]

Http://www.phpthinking.com/archives/207 formatting and then step by step

Http://www.phpthinking.com/archives/207

If yum is installed, you can uninstall yum and compile a final php command to make a soft connection.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.