Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use showduplicates in yum command

Shulou Source: shulou.com Published: 2022-06-01 10:34:01 10月02日 Update

This article introduces the relevant knowledge of "the use of showduplicates in the yum command". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Yum has a lot of parameters and plug-ins available, so here I'll show you how to use the yum-showduplicates command, which is very useful for us. Especially if you encounter version mismatch compatibility and software dependency problems, you can use this command to find the software version you want.

Assuming that you need to find a specific version of pcre for php, type:

The code is as follows:

# yum search-showduplicates pcre

The keyword pcre will be used to search the yum source for matching software packages.

Output:

The code is as follows:

Loaded plugins: fastestmirror, versionlock

Loading mirror speeds from cached hostfile

* base: mirrors.usc.edu

* extras: mirror.web-ster.com

* updates: mirror.hmc.edu

Reading version lock configuration

= = Matched: pcre = =

Pcre-6.6-9.el5.i386: Perl-compatible regular expression library

Pcre-6.6-9.el5.i386: Perl-compatible regular expression library

Pcre-devel-6.6-9.el5.i386: Development files for pcre

According to the output information, find the full name of the version you want, and then install it with yum

Of course, this uses yum search-showduplicates to output so many packages that if the goal is not clear, it is impossible to determine which package we can use. So you can use the following command:

The code is as follows:

# yum-showduplicates list php-gd

Output:

The code is as follows:

Loaded plugins: fastestmirror, versionlock

Loading mirror speeds from cached hostfile

* base: mirrors.usc.edu

* extras: mirror.web-ster.com

* updates: mirror.hmc.edu

Reading version lock configuration

Available Packages / / available packages

Php-gd.i386 5.1.6-40.el5_9 base

Php-gd.i386 5.1.6-43.el5_10 update

Let's compare the difference between adding available and not adding it. To see the available pcre here, enter:

The code is as follows:

# yum-- showduplicates list available pcre / / View the available pcre

The output is:

The code is as follows:

Loaded plugins: fastestmirror, versionlock

Loading mirror speeds from cached hostfile

* base: mirrors.usc.edu

* extras: mirror.keystealth.org

* updates: mirror.hmc.edu

Reading version lock configuration

Available Packages

Pcre.i386 6.6-9.el5 base

After removing the available, enter:

The code is as follows:

# yum-showduplicates list pcre

Output:

The code is as follows:

Loaded plugins: fastestmirror, versionlock

Loading mirror speeds from cached hostfile

* base: mirrors.usc.edu

* extras: mirror.web-ster.com

* updates: mirror.hmc.edu

Reading version lock configuration

Installed Packages

Pcre.i386 6.6-9.el5 installed

Available Packages

Pcre.i386 6.6-9.el5 base

Is there an extra installed packages line, but this line will not be displayed if you are installed in source code instead of rpm or yum.

The above command can be used directly.

The code is as follows:

# yum list Software name

Instead of using.

This is the end of the content of "how to use showduplicates in the yum command". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Code output command version software method of use input content parameters more knowledge practicality achievement and then information key words keywords names dilemmas Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Xiaomi Linux Apple Redmi