Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the rpm command

2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to use rpm command", the content is simple and easy to understand, clear organization, I hope to help you solve doubts, let Xiaobian lead you to study and learn "how to use rpm command" this article bar.

rpm (Red Hat Package Manger) refers to packaging and installation tools

rpm -a

rpm -q

< rpm package name>

Interpretation: Query whether a package is installed

rpm -qa

rpm -qa -q Query all packages (all) using query mode (query)-a

List all installed rpm packages

The difference from rpm -a is already, for example:

rpm -qa | grep

rpm -qa | grep xxx |pipeline technology, delete grep lookup---a text search tool

Interpretation: Find xxx in the information returned by-qa and return the final result.

rpm -qa |grep -i xxx-i case insensitive xxx

Of course, grep can also be combined with other commands as a search tool

rpm -e --"unloading" requiring caution

Normally, we'd use

rpm -e xxx

But if software yyy is "dependent" on xxx--that is, yyy must have xxx to run

is returned

error: xxx is needed by yyy

At this time, you can force deletion without checking dependencies (careful operation)

rpm -e --nodeps

Alternatively, if several packages have the same name, ignore dependencies and delete all packages with the same name using the following command

rpm -e --allmatches --nodeps

Of course, delete and query can be combined, for example

rpm -e --nodeps 'rpm -qa | grep mysql'

the problems that may be encountered

warning: /etc/yum.repos.d/mysql-community.repo saved as /etc/yum.repos.d/mysql-community.repo.rpmsave

The cause of the problem is unknown. I don't know why it is automatically saved as.repo.rpmsave. The solution is to change it to the original.repo format by mv command.

The above is "rpm command how to use" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report