Error package yum install



YUM Error Downloading Packages – how we fix it?

by Keerthi PS | Nov 22, 2019

Not able to download packages with yum due to the error ‘[Errno 256] No more mirrors to try’? We can help you with it.

Usually, corrupted yum cache or repo directory ends up in this error. A few file cleanups can easily fix this.

This can also occur due to an outdated whitelist of the Public CIDR list.

At Bobcares, we often fix yum errors, as a part of our Server Management Services.

Today, let’s have a look into this yum error. And see how our Support Engineers fix this.

Why does yum downloading packages end up in error?

We often use yum to install packages and dependencies in a single command. However, sometimes we have seen this yum updates ending up with an error.

Mostly, this happens due to errors with yum cache, local files in the repository folder, outdated firewall rules, etc.

Let’s check out how our Support Engineers fix this error in each case.

How we fix the yum error in downloading packages?

The error message while installing the FTP package appears as,

Now let’s have a look at each reason and its fix.

1. Clear yum cache to download packages

Old cache in the system can cause errors while downloading packages. Hence our Support Engineers delete the cache using the command,

In addition, we also delete the metadata for the enables repositories. For this, we use the command,

Later, we clean up the yum folder using the command,

Finally, we check the yum update again. Thereby, we ensure to fix the error.

2. Check repository to fix yum error

In some servers, the yum repository contains corrupted files. And accessing these repositories while updating can cause errors. So our Support Engineers check the folder yum.repos.d

Initially, we list the files using the command,

Later we check the system registry. Our Experts check the files under both RHN classic and RHSM. And removes the error causing local repositories. Later, we check if the update is running successfully.

3. Network access to download packages

Similarly, network access is important for yum updates. So, we check the access to the repository URL by ping.

In addition, we also ensure to whitelist the Public CIDR list for Red Hat. Because outdated whitelist restricts access to the CDN can result in errors.

Usually, yum download the packages using the base URL in the config file. This URL is cdn.redhat.com. Basically, there are multiple servers resolving to this address.

So we whitelist these IPs listed in the Public CIDR list.

[Need assistance in fixing yum errors? – We are available 24/7]

Conclusion

In short, yum error downloading packages occur due to corrupted cache or repository. Another possible reason is network access denial due to the firewall in the system. Today, we saw how our Support Engineers fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

Источник

How to fix yum errors on CentOS, RHEL or Fedora

Last updated on October 4, 2020 by Dan Nanni

On Red Hat based systems such as RHEL, CentOS or Fedora, yum is used as a package management tool for installing, updating and removing RPM packages. When you try to install a package with yum command, you may encounter errors for various reasons. In this post, I will describe several common error symptoms for the yum command, and explain how to fix yum errors.

Читайте также:  Unhandled exception caught cod bo2

1. Fix 404 Errors

Symptom: When you try to install a package with yum , yum throws an error: «The requested URL returned error: 404 Not Found»

You can get these 404 errors when the metadata downloaded by yum has become obsolete.

To repair 404 errors generated by yum , clean yum metadata as follows.

Or you can clear the whole yum cache:

2. Fix Connection Failure Errors

Symptom: You get «network is unreachable» or «couldn’t connect to host» errors while running yum command.

The error means that you cannot properly connect to repository servers for some reason. If you can still ping the servers without any problem, check if your system is behind a proxy. If you are running yum behind a proxy, but have not specified the proxy in the yum configuration, you will get connection failure errors like the above.

To configure a proxy in the yum configuration:

3. Fix Metadata Checksum Errors

Symptom: You get «Metadata file does not match checksum» while running yum command.

You can get the metadata checksum errors when the metadata downloaded by yum has become outdated.

To repair yum checksum errors, clean yum metadata:

4. Fix Yum Lock Errors

Symptom: When you attempt to install a package with yum , you get an error saying that «Another app is currently holding the yum lock.»

The culprit for this error is oftentimes PackageKit which is responsible for auto updates on Red Hat based systems. The PackageKit process gets automatically started upon boot, holding the yum lock.

To fix the error, turn off PackageKit on your system, so that it won’t perform auto update checks. Here is an instruction for disabling PackageKit.

Once you reboot your desktop, you will no longer get yum lock errors.

5. Fix Repository Database Read Errors

Symptom: When you install a package with yum , you get the errors saying that «compressed file ended before the logical end-of-stream was detected»

This error can happen when yum command has been interrupted while it was downloading a repository database. So the saved database is incomplete, and considered corrupted.

To solve this problem, clean up yum database by running:

6. Fix Repository Metadata Read Errors

Symptom: When you install or search for any package with yum , you get the following errors:

This error can happen due to yum metadata issues. To fix this problem, clean up yum data including metadata and local cache.

7. Fix Packages Database Error

Symptom: You are getting «cannot open Packages database in /var/lib/rpm» error while running the yum command.

This problem can happen when the local RPM database got corrupted or missing for some reason. Here is how to recreate the RPM database to fix this error.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Источник

yum + does not update installed package

we are trying to install the following rpm ( that actually already installed )

but its returned exit code 1

why yum not ignoring the rpm that already installed and returned error?

note — we also try yum clean all ,

and removed the /var/cache/yum/*

3 Answers 3

I am under the impression that you are complaining about yum default behavior.

yum serves as a package manager that installs/removes or upgrades packages.

If there’s Error: Nothing to do it is de-facto failing a task to install / remove or upgrade a package — hence return code == 1.

If you would like to check if the package is installed and if it is not then install it try the following :

Читайте также:  Files error reading gta3 img

rpm -qa | grep wget || yum -y install wget

This should give you $? == 0 in the standard scenario.

You are trying to install packages that are either older than or the same version as what you already have installed on your system. yum checks for this before it operates which is why it is giving the messages when you attempt to use it with those packages. Otherwise, what would yum do during updates? If an update came out and was available in one of the repos, would it upgrade them both to the latest and have two of the exact same package on the system?

If you need an older version of software, then you need to compile it from source instead of using yum to install its rpm .

I was facing a similar issue while installing a package and the problem was the same version of the package already existed.

The solution which worked for me: Lets say the package name is: package-abc

Источник

yum fails with Error: Protected multilib versions: package.i686 != package.x86_64

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Issue

  • Unable to install multilib package; Yum gives the error: Protected multilib versions: package-2.x86_64 != package-1.i686

Resolution

This occurs when yum is attempting to install different architectures, and different versions, of the same package.

Verify that the packages which you want to update are all available in the repository and at the same version

NOTE: Replace package with the name of the package you are experiencing the yum issue with

If you find «package» has a higher version then a similar «package-*»

  • If using Satellite or a local repository, it may not be sync’d properly
  • You need to enable a repository which provides the update for installed packages
    — Identify what repository has the packages you need by searching the portal. Below are links for Red Hat Enterprise Linux Server x86_64
    — RHEL 7 Package Search
    — RHEL 6 Package Search
    — RHEL 5 Package Search
  • Your system may have pre-existing rpm database problems. Verify with:
    • # package-cleanup —dupes
    • # package-cleanup —problems
    • We can resolve duplicate packages with this KCS How to remove duplicate packages from a failed yum transaction
  • If you install a package that is a different version, and architecture, then a package you already have installed.
    • # yum list package —showduplicates
    • Install the intended package at the version matching what you already have installed
    • Update the existing installed rpms before attempting to install the package
  • If you already have installed different versions of different architectures, this will show as a duplicate in yum check output, but it is a protected multilib caused by forcing a package installation or by disabling protected_multilib.
  • Verify that you are not excluding packages
    • # grep exclude /etc/yum.conf
  • If you are using the versionlock plugin, verify that the packages necessary to update are not being locked at a specific version
    • # yum versionlock list
  • When registered with Red Hat Subscription Manager, if the system is locked to a minor release, that may be causing the issue
    • # subscription-manager release
  • If the error is from yum installing a .i686 version that was not present before the update, ensure that all variants of that package (package-devel, package-static, package-libs, package-*) are being updated. Generally these versions all must match.
    • If package is updated, but package-devel is not, yum may pull in package.i686 as a dependency which creates the multilib error. The resolution is to update the -devel package
    • If you are still encountering a multilib error, please open a case with Red Hat Support
    Читайте также:  Error 504 gateway timeout in proxy

    Root Cause

    • Multilib means support for multiple architectures
    • This issue arises when .x86_64 and .i686 packages are not the same version
    • If both the 64 bit and the 32 bit version of a package are available in the repository, they must be the same version.

    Diagnostic Steps

    Verify your yum cache is up to date with the repo

    List out all the packages and check to see if everything is available that you need available

  • # yum list all —showduplicates
  • # yum list

    Verify there are no excludes or version locks applied to your system

    • # grep exclude /etc/yum.conf
    • # yum versionlock list
    • # subscription-manager release

    Check for pre-existing problems in the rpm database

    • # yum check
    • # package-cleanup —dupes
    • # package-cleanup —problems

    Rebuild the database with
    rpm —rebuilddb

    Removing the Conflicting Packages

    • If only after you have run the yum clean commands and rebuilt the database and you are still receiving the issue, then the only other option is to remove the package forcefully. But please note: If the package has many core dependencies and its removed, then this could break the server and it would be very difficult to recover from. Therefore this option is not recommended, in this case seek Red Hat support
      For non production servers, use this option at your own risk.

    *Prerequisite: Ensure you have a dvd copy of the current version you are running.
    How to create a dvd yum repository

    • Product(s)
    • Red Hat Enterprise Linux
    • Component
    • yum
    • Category
    • Troubleshoot
    • Tags
    • yum

    This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

    Источник

    yum + does not update installed package

    we are trying to install the following rpm ( that actually already installed )

    but its returned exit code 1

    why yum not ignoring the rpm that already installed and returned error?

    note — we also try yum clean all ,

    and removed the /var/cache/yum/*

    3 Answers 3

    I am under the impression that you are complaining about yum default behavior.

    yum serves as a package manager that installs/removes or upgrades packages.

    If there’s Error: Nothing to do it is de-facto failing a task to install / remove or upgrade a package — hence return code == 1.

    If you would like to check if the package is installed and if it is not then install it try the following :

    rpm -qa | grep wget || yum -y install wget

    This should give you $? == 0 in the standard scenario.

    You are trying to install packages that are either older than or the same version as what you already have installed on your system. yum checks for this before it operates which is why it is giving the messages when you attempt to use it with those packages. Otherwise, what would yum do during updates? If an update came out and was available in one of the repos, would it upgrade them both to the latest and have two of the exact same package on the system?

    If you need an older version of software, then you need to compile it from source instead of using yum to install its rpm .

    I was facing a similar issue while installing a package and the problem was the same version of the package already existed.

    The solution which worked for me: Lets say the package name is: package-abc

    Источник

  • Оцените статью
    toolgir.ru
    Adblock
    detector