Problem of uninstalling php on linux centos7
黄舟
黄舟 2017-06-28 09:24:29
0
3
1050

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?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(3)
学霸

After deleting the package according to your method, execute yum clean allTry it

typecho

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

Ty80

which finds a file, not a directory. You can ls -lsee where the file is soft-linked to, and you will know where your own PHP is installed.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!