Centos7 repeatedly installed PHP results can not be uninstalled cleanly

Source: Internet
Author: User
Started to install PHP, but later on the internet to extract some yum install Php-pdo php-zip and the like, the results now PHP can not be uninstalled and can not be re-installed
Using the Yum install PHP prompt is already installed. But Php-v does not exist.

The whole process:
[Root@localhost conf.d]# whereis phpphp:[root@localhost conf.d]# yum remove phploaded plugins:fastestmirrorno Match for a Rgument: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 Remova L[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:mir rors.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 'll be installed--> finished Dependency Res Olutiondependencies 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[r Oot@localhost conf.d]#


Reply to discussion (solution)

Point the bin in the PHP installation directory to ln xx/usr/bin try

You can try this uninstall:

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

Yum installs you on Yum Uninstall and then compiles a last PHP command to make a soft connection to the past

  • Related Article

    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.