Home >Operation and Maintenance >Linux Operation and Maintenance >The correct way to delete packages using rpm
❝Today I was preparing to install Laravel in the virtual machine. I read the documentation and said that it requires version 7.2.5 or above, so I needed to change the PHP version, and then I got this Articles. All Kaka's articles are based on a process from solving a problem to the final solution. If you just want to know the results, you can go directly to the end of the article.
❞
Recommended tutorials: "Linux Operation and Maintenance" "PHP Tutorial" "Laravel Tutorial"
When installing all frameworks and installation packages, first The first thing you must look at is the environment required for the project. You can see that Larave's version requirement for PHP is 7.2.5 or above. Come to the virtual machine to check the PHP version. You can check the version through php -v
.
Kaka is not used here. PHP has been deleted by Kaka. This command cannot be executed, which is embarrassing. . . .
So Kaka will use the information displayed by the previous rpm -qa | grep php
command to show everyone the previous version of Kaka
This version is used by Kaka rmp installed, so it also needs to be uninstalled using rpm. At this time, all PHP packages have been deleted
So how did Kaka delete it?
Still using rpm -e php70w....
It is really a waste of time, good time cannot be spent on deleting files.
And some packages sometimes have dependencies. You must have encountered such a situation when deleting them.
This error means that the installation package you need to uninstall is being used by other packages, which is annoying, right? Kaka teaches you how to use a command to solve these troubles. rpm -e --nodeps rpm -qa | grep php
At this time, it will take about 3 seconds to delete all PHP installation packages. Isn’t it very nice
The main functions of rpm are installation, uninstallation, and upgrade.
Here, Kaka will sort out some commonly used rpm parameters for everyone to use.
These parameters are commonly used by Kaka.
rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpmOr use this You can
yum install epel-release -y rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpmInstall the required extensions
yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel php72w-embedded php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xmlAfter the execution is completed, the version number is 7.2
You can access it normally in the browser, nginx has been installed before KaKa Okay.
The above is the detailed content of The correct way to delete packages using rpm. For more information, please follow other related articles on the PHP Chinese website!