[Linux] What is the method to solve the package dependency error of yum and rpm in the actual workplace?

Introduction

When installing packages with yum or rpm at work, I often wrestled with dependency errors. (For example, if you want to install the GNOME desktop on a Linux server.) This time, I would like to output how to deal with dependency errors that are being done in the actual workplace.

What is a package dependency error?

The following error will occur.

[root]# rpm -ivh compat-libstdc++-33-3.2.3-69.el6.i686.rpm
warning: compat-libstdc++-33-3.2.3-69.el6.i686.rpm:Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error:Lack of dependency:
        libc.so.6 is compat-libstdc++-33-3.2.3-69.el6.Required for i686
        libc.so.6(GLIBC_2.0)Is compat-libstdc++-33-3.2.3-69.el6.Required for i686
        libc.so.6(GLIBC_2.1)Is compat-libstdc++-33-3.2.3-69.el6.Required for i686
        libc.so.6(GLIBC_2.1.3)Is compat-libstdc++-33-3.2.3-69.el6.Required for i686
        libc.so.6(GLIBC_2.2)Is compat-libstdc++-33-3.2.3-69.el6.Required for i686
        libc.so.6(GLIBC_2.3)Is compat-libstdc++-33-3.2.3-69.el6.Required for i686
        libgcc_s.so.1 is compat-libstdc++-33-3.2.3-69.el6.Required for i686
        libgcc_s.so.1(GCC_3.0)Is compat-libstdc++-33-3.2.3-69.el6.Required for i686
        libgcc_s.so.1(GCC_3.3)Is compat-libstdc++-33-3.2.3-69.el6.Required for i686
        libgcc_s.so.1(GLIBC_2.0)Is compat-libstdc++-33-3.2.3-69.el6.Required for i686
        libm.so.6 is compat-libstdc++-33-3.2.3-69.el6.Required for i686

Real workplace environment

item Contents
OS RHEL/CentOS
Repository destination In-house local repository/ISO file

How to deal with it

1. Minor version mounts the above local repository / ISO file

This is the first troubleshooting method you have come up with in the field.

For example, suppose you get a dependency error when installing a package.

①RHEL7.3(Your existing machine)To RHEL7.Install GNOME desktop with yum using ISO 3
(2) A dependency error is displayed and installation is not possible.

Here's what we were actually doing when dealing with such dependency errors.

① Minor version sets the upper ISO(Example:RHEL7.6 mag)
② Repository setting/Clear cache/Repository read
③ Install GNOME desktop again with yum

** In this way, if the minor version sets the above ISO file (local repository), you may be able to install it. ** **

2. Package installation using multiple repositories

Even if you execute "1. Mount the local repository / ISO file whose minor version is one level higher", it is a solution when the dependency error is displayed.

As a countermeasure, it will be like this.

① Set so that you can access multiple repository destinations(Repository settings, etc.)
② Install again with yum

For example, if you are a company that has a local repository in-house, You can try setting up multiple local repositories so that you can access them instead of just one.
** In this way, you may be able to install even if you try to set up multiple repositories. ** **

3. If you cannot install due to a dependency error (last resort)

Uninstall the package detected by the dependency error.

yum remove <Cause package>

** This is not recommended for your existing server. ** **

This is because it can affect the service.

It is safer to find a way other than removing the package.

** * If you use this method, be sure to investigate whether the package can be deleted! ** **

Summary

** What to do if a dependency error occurs **

  1. Minor version mounts the above local repository / ISO file
  2. Package installation using multiple repositories
  3. If you cannot install due to a dependency error (last resort)

Recommended Posts

[Linux] What is the method to solve the package dependency error of yum and rpm in the actual workplace?
How to give and what the constraints option in scipy.optimize.minimize is
What is the cause of the following error?
[Introduction to Python] What is the method of repeating with the continue statement?
What is the difference between Unix and Linux?
What to do when only the window is displayed and nothing is displayed in pygame Note
What to do if the progress bar is not displayed in tqdm of python
What is the true identity of Python's sort method "sort"? ??
Ventilation is important. What I did to keep track of the C02 concentration in the room
What to do if the package dependency cannot be repaired
Commands and files to check the version of CentOS Linux
What is the Linux kernel?
[Python] What is pip? Explain the command list and how to use it with actual examples
The impact of Linux page cache attack countermeasures is large and is expected to be prolonged [Translation]
Unfortunately there is no sense of unity in the where method
What to do if the inode is exhausted on EC2 Linux
What to do when the value type is ambiguous in Python?
[Python] What to do when PEP8 is violated in the process of importing from the directory added to sys.path
[Question] In sk-learn random forest regression, an error occurs when the number of parallels is set to -1.
What to do if you get the error RuntimeError: Python is not installed as a framework when trying to use matplitlib and pylab in Python 3.3
[CleanArchitecture with Python] Apply CleanArchitecture step by step to a simple API and try to understand "what kind of change is strong" in the code base.
What is Newton's method? ?? Approximate solution of equation to be solved by Newton's method
Ford-Fulkerson Method and Its Applications-Supplement to Chapter 8 of the Algorithm Quick Reference-
[Linux] What is the host name confirmation method other than the hostname command?
What to do when the result downloaded via scrapy is in English
[Introduction to Python] What is the difference between a list and a tuple?
What I did to keep track of the humidity and temperature of the archive
[Linux] Command to get a list of commands executed in the past
What kind of book is the best-selling "Python Crash Course" in the world?
[Linux] I tried to verify the secure confirmation method of FQDN (CentOS7)
What to do when the warning "The environment is in consistent ..." appears in the Anaconda environment
What is the fastest way to create a reverse dictionary in python?
An engineer who has noticed the emo of cryptography is trying to implement it in Python and defeat it