I am a newbie. I have a centos server. I installed apache php mysql according to the instructions at https://help.aliyun.com/docum.... The php version is 7.0.12, but I want to install the extension library later. Can't install it. Then I looked for other methods on the Internet to install other versions of php. It felt a bit confusing, so I wanted to uninstall the php installed on the server.
According to the experience on the Internet, I used the rpm -qa | grep php command to find out the package to be uninstalled, and used the rpm -e command to uninstall the package to be uninstalled, and then used the rpm -qa | grep php command to check that it has been empty. However, when I use the php -v command, there is still a php version information prompt (7.0.12), and I can still check phpinfo. Later, I searched for a method online. I also tried yum remove php. The which php command found a non-existent directory '/usr/sbin/php' (Sorry, this paragraph is wrong. Check which php to the file that exists in /usr/sbin/php).
Then I installed it with another version of php package. After installation, php -v still displayed (7.0.12), which means that the php version installed at the beginning was not completely uninstalled. I saw no other instructions in other tutorials online. I would like to ask all the experts, how should I uninstall php in the server at this time?
欧阳克2017-06-28 09:26:29
After deleting the package according to your method, execute yum clean all
Try it
typecho2017-06-28 09:26:29
yum remove php
yum remove php*
yum remove php-*
yum remove php7
yum remove php70
yum remove php7.0
yum remove php-common
This is the bitter uninstallation of Qiu Shen = w
PHP中文网2017-06-28 09:26:29
which finds a file, not a directory. You can ls -l
see where the file is soft-linked to, and you will know where your own PHP is installed.