Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the correct posture for deleting a package using rpm

Shulou Source: shulou.com Published: 2022-06-02 00:39:26 10月05日 Update

This article introduces how to use rpm to delete the correct posture of the package. The content is very detailed. Interested friends can refer to it for reference. I hope it can help you.

1. Use rpm command to delete all PHP packages in 3 seconds

When installing all frameworks and packages, the first thing you must look at is the environment you need for your project. You can see that Larave requires PHP version 7.2.5 or above.

Go to the virtual machine to see the PHP version, you can check the version with php -v.

Click here is not used, PHP has been deleted by click, this command can not be executed, embarrassing...

So, click, click,| The grep php command displays information to show you the version before click

This version is installed by rmp, so it also needs to be uninstalled by rpm. All PHP packages have been removed.

How did that click get deleted?

Still using rpm -e php70w... That would be a waste of time. Good time could not be spent deleting files.

And some packages have dependencies, which you must have encountered when deleting them.

This error means that the installation package you need to uninstall is being used by another package.

Kaka teaches you to use a command to solve these problems. rpm -e --nodeps rpm -qa | grep php

At this time, it takes about 3 seconds to remove all PHP installation packages. Is it very nice?

II. Common parameters of rpm command

The main function of rpm is to install, uninstall and upgrade.

Here are a few common rpm parameters for everyone to use.

-e uninstall rpm package-i install rpm package-u upgrade rpm package--nodeps do not verify package dependencies

These parameters are frequently used by Kaka.

3, yum install PHP 7.2

installation source

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.rpm

Or you can use this.

yum install epel-release -y

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Install 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-xml

After the completion of the implementation to see the version number is 7.2 in the browser inside can be normal access, nginx is a click before the installation has been good.

About the use of rpm to delete the correct posture is how to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

Tags: Version instruction parameter that is posture content commonly used time time more upgrade help yes embarrassment annoyance function information interest function can be passed through Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Information Huawei Shulou Tech Info MariaDB