Error some packages from local repository have incorrect checksum

Trying to install CentOS 8 on a laptop that usually runs CentOS 7. To do the install I am using the DVD ISO booting from USB, copied to usb with Fedora Media Writer. Everything goes fine until it starts doing the install through the Anaconda and it fails with error:

tony_down_under

Posts: 83
Joined: 2019/08/07 01:50:24
Location: Perth, Australia but originally from Carshalton, Surrey

CentOS 8 1905 DVD ISO install fail — local repository error «incorrect checksum»

Trying to install CentOS 8 on a laptop that usually runs CentOS 7. To do the install I am using the DVD ISO booting from USB, copied to usb with Fedora Media Writer. Everything goes fine until it starts doing the install through the Anaconda and it fails with error:

Some packages from the local repository have incorrect checksum

Last edited by tony_down_under on 2019/11/12 08:55:29, edited 1 time in total.


winders_cruncher

Posts: 6
Joined: 2019/11/07 00:40:58

Re: CentOS 8 1905 DVD ISO install fail

Post

by winders_cruncher » 2019/11/07 00:42:44

Did you find a solution for this? I’m on my 3rd download attempt trying to get an ISO that won’t fail the checksum error you had.


User avatar

TrevorH

Site Admin
Posts: 32527
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 8 1905 DVD ISO install fail

Post

by TrevorH » 2019/11/07 01:21:23

How do you know it’s a bad download? Did you check the file’s sha256sum against the list published in the Release Notes ? If that matches then your problem is writing it to the USB stick or the USB stick itself not a bad download.

Also check http://wiki.centos.org/HowTos/InstallFromUSBkey for a list of «do not use» USB stick tools.


winders_cruncher

Posts: 6
Joined: 2019/11/07 00:40:58

Re: CentOS 8 1905 DVD ISO install fail

Post

by winders_cruncher » 2019/11/10 14:53:21

Took a while to remember to come back and update this and see your reply. Yes the download checksum was fine, I copied the file to the USB again and proceeded to install without issue.


nouvo09

Posts: 183
Joined: 2009/09/19 19:21:36
Location: Paris, France

Re: CentOS 8 1905 DVD ISO install fail

Post

by nouvo09 » 2019/11/10 17:53:45

Ok if the file downliaded is sane and you can’t boot, maybe the image on de device is corrupted.

So you could the checksum againt the device directly, for exemple

sha256sum /dev/sde

and compare to the result of before.

Member of centos-FR forum


tony_down_under

Posts: 83
Joined: 2019/08/07 01:50:24
Location: Perth, Australia but originally from Carshalton, Surrey

Re: CentOS 8 1905 DVD ISO install fail

Post

by tony_down_under » 2019/11/12 01:09:49

Tried this again yesterday. The mirrors still say 1905 and my browser has painted the links a different colour to show I’ve visited them before. Same install issue still exists after almost 2 months later…

Anyone know what the problem is here? I want to get my /devs on centos 8 for their laptops but I just cant do it because the DVD installation medias are broken! Centos team — you’re inhibiting adoption.


User avatar

TrevorH

Site Admin
Posts: 32527
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 8 1905 DVD ISO install fail

Post

by TrevorH » 2019/11/12 02:14:50

If the packages have incorrect checksums then that is because you either have a bad download or it’s been written to whatever media you’re reading it from wrongly or it’s being read badly. The packages on the iso image are correct and can be read.

Step 1 : verify the sha256sum of your downloaded file against the list in the CHECKSUMS file in the same directory on the mirror (any mirror) which you downloaded from. Or check them against the list in the CentOS 8 Release Notes in the wiki https://wiki.centos.org/Manuals/Release … ntOS8.1905 or https://wiki.centos.org/Manuals/Release … ntOSStream depending on which you used. Repeat download until matching.

Step 2: write it to a USB stick, preferably using dd since it makes no changes to what it’s copying. Do not use any of the broken utilities for copying the iso file — the list is in the wiki https://wiki.centos.org/HowTos/InstallFromUSBkey — though dd is needed for the rest of this or you have to calculate how many blocks to read back. Make a note of the number of blocks that dd says it wrote when it ends for use in step 3.

Step 3: use dd to read the same number of blocks back from the USB stick and write them to a differently named iso file on disk. Run sha256sum on that once it’s complete and compare with the first one. If they are not identical then throw the USB stick in the bin. Repeat from step 2.


tony_down_under

Posts: 83
Joined: 2019/08/07 01:50:24
Location: Perth, Australia but originally from Carshalton, Surrey

Re: CentOS 8 1905 DVD ISO install fail

Post

by tony_down_under » 2019/11/12 07:31:17

I use fedora media writer to do the copy from windows 10 to usb drive. It verifies — no issue.
When the system has booted anaconda, I can «verify» the local repo there — it also verified without issue. But when trying to install from the local repo, it fails with «some packages from local repository have incorrect checksum».

I’m trying to install a workstation and add some packages.. i’ll try again without any package selections and see what occurs. Thanks for the advice.

Same issue when using default software selection. Something is wrong with the DVD install media.


tony_down_under

Posts: 83
Joined: 2019/08/07 01:50:24
Location: Perth, Australia but originally from Carshalton, Surrey

Re: CentOS 8 1905 DVD ISO install fail

Post

by tony_down_under » 2019/11/12 08:01:57

Sha256 validates:
$ sha256sum CentOS-8-x86_64-1905-dvd1.iso
ea17ef71e0df3f6bf1d4bf1fc25bec1a76d1f211c115d39618fe688be34503e8 CentOS-8-x86_64-1905-dvd1.iso
ea17ef71e0df3f6bf1d4bf1fc25bec1a76d1f211c115d39618fe688be34503e8 <<<<<—— this is copied from the link https://wiki.centos.org/Manuals/Release … 4dfd921557

Will try and install centos 7 so I can validate the usb drive against the sha256.

But given that other users are experiencing the same issue, it does seem like an issue with the dvd.


tony_down_under

Posts: 83
Joined: 2019/08/07 01:50:24
Location: Perth, Australia but originally from Carshalton, Surrey

Re: CentOS 8 1905 DVD ISO install fail

Post

by tony_down_under » 2019/11/12 08:54:26

I sha256 the usb installation media. To do this I done the following steps:

1. insert the usb media in a centos machine
2. run the sha256sum against /dev/sdb1

This gives:

Code: Select all

[root@CV000142 cvadmin]# sha256sum /dev/sdb1
ea17ef71e0df3f6bf1d4bf1fc25bec1a76d1f211c115d39618fe688be34503e8  /dev/sdb1
[root@CV000142 cvadmin]# 

And the sha from the release site is: ea17ef71e0df3f6bf1d4bf1fc25bec1a76d1f211c115d39618fe688be34503e8

They are exactly the same. The Centos 8 DVD install and local repository is confirmed as broken.



Description


Justin Pierce



2019-11-25 16:15:20 UTC

Description of problem:
After a reposync of rhel-8 baseos & appstream repositories, I am still unable to install mariadb due to missing files/checksum errors.



Version-Release number of selected component (if applicable):
4.2.7
  Installed: dnf-0:4.2.7-7.el8_1.noarch at Tue Oct 29 16:41:41 2019
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at Mon Oct 21 12:28:04 2019

  Installed: rpm-0:4.14.2-25.el8.x86_64 at Tue Oct 29 16:41:36 2019
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at Wed Aug  7 13:32:37 2019



How reproducible:
100%

Steps to Reproduce:
1. Run a rhel8 ubi image
2. Reposync the pulp.dist baseos & appstream rhel-8 repositories
3. Attempt to use those repositories to install mariadb

Actual results:
Error opening file for checksum: /4.2/rhel-8-appstream-rpms/rhel-8-appstream-rpms/Packages/p/perl-IO-Socket-IP-0.39-5.el8.noarch.rpm
Package "perl-IO-Socket-IP-0.39-5.el8.noarch" from local repository "rhel-8-appstream-rpms" has incorrect checksum
Error opening file for checksum: /4.2/rhel-8-appstream-rpms/rhel-8-appstream-rpms/Packages/p/perl-libnet-3.11-3.el8.noarch.rpm
Package "perl-libnet-3.11-3.el8.noarch" from local repository "rhel-8-appstream-rpms" has incorrect checksum
Error opening file for checksum: /4.2/rhel-8-appstream-rpms/rhel-8-appstream-rpms/Packages/p/perl-Digest-1.17-395.el8.noarch.rpm
Package "perl-Digest-1.17-395.el8.noarch" from local repository "rhel-8-appstream-rpms" has incorrect checksum
Error opening file for checksum: /4.2/rhel-8-appstream-rpms/rhel-8-appstream-rpms/Packages/p/perl-Digest-MD5-2.55-396.el8.x86_64.rpm
Package "perl-Digest-MD5-2.55-396.el8.x86_64" from local repository "rhel-8-appstream-rpms" has incorrect checksum
Error: Some packages from local repository have incorrect checksum


Expected results:
All RPMs & modules should be intact in the local repositories.


Additional info:
Detailed steps:

host$ mkdir artifacts
host$ mkdir 4.2
# Run a ubi image 

host$ sudo podman run -it --rm -v $PWD/artifacts:/artifacts:Z -v $PWD/4.2:/4.2:Z registry.access.redhat.com/ubi8/ubi@sha256:a7209baef64d9a6e8e87cbc2a6f27d402a04cd3750006f1338a2924b4bf585f7 /bin/sh

# reposync baseos  (yum.conf attached to this BZ)
ubi$ dnf -v reposync --download-metadata --setopt=module_platform_id="platform:el8" -c /artifacts/yum.conf -p /4.2/rhel-8-baseos-rpms --delete --arch noarch --arch x86_64 -n --repo rhel-8-baseos-rpms --downloadcomps | tee reposync.1.log

# reposync appstream (yum.conf attached to this BZ)
ubi$ dnf -v reposync --download-metadata --setopt=module_platform_id="platform:el8" -c /artifacts/yum.conf -p /4.2/rhel-8-appstream-rpms --delete --arch noarch --arch x86_64 -n --repo rhel-8-appstream-rpms --downloadcomps | tee reposync.2.log

# Overwrite system yum.conf with yum.install.conf from this BZ
ubi$ cp /artifacts/yum.install.conf /etc/yum.conf

# Installing python36 works great (see attached log)
ubi$ dnf install python36

# Installing mariadb fails (see attached log)
ubi$ dnf install mariadb


Comment 2


Marek Blaha



2019-12-09 11:36:11 UTC

This is actually a duplicate of the https://bugzilla.redhat.com/show_bug.cgi?id=1775434 bug. The problem is that `dnf reposync --newest-only` is broken with modular repositories.
As a workaround (until the patched version is released) you can drop `-n` option when syncing the appstream repository - at the cost of several gigabytes of storage space.
I tried your use case with patched reposync (https://github.com/rpm-software-management/dnf-plugins-core/pull/375) and I can confirm that the patched version works well and mariadb is installable.

If you disagree with closing this bug as a duplicate, please do not hesitate to reopen it.

*** This bug has been marked as a duplicate of bug 1775434 ***

This is a bit obscure, but I just spent some quality time in the libdnf sources, so let me report my findings.

Steps:

  • Create a local repo with a package in it that has a wrong checksum.
  • Try to install that package with PackageKit, e.g., «pkcon install «

I have attached a tarball with such a broken repository:

broken-repo.tar.gz

# cd /var lib/
# tar xzf broken-repo.tar.gz
# cat /etc/yum.repos.d/broken.repo
[broken]
name=Broken Repo
baseurl=file:///var/lib/broken-repo/
enabled=1
gpgcheck=0

# pkcon install -y app-service
Resolving                     [=========================]         
Installing                    [=========================]         
Loading cache                 [=========================]         
Finished                      [=========================]   
Fatal error: Error opening file '/': Is a directory`

(The «/» in the error message is the $PWD of the packagekitd process.)

This happens because libdnf tries to download a correct version of the package file from the repo, but the code for downloading from local repos is broken.

You probably want this patch:

diff --git a/libdnf/dnf-repo.c b/libdnf/dnf-repo.c
index cb5fce8..79c167b 100644
--- a/libdnf/dnf-repo.c
+++ b/libdnf/dnf-repo.c
@@ -2013,7 +2013,7 @@ dnf_repo_download_packages(DnfRepo *repo,
             DnfState *state_loop = dnf_state_get_child(state);
 
             dnf_package_set_repo(pkg, repo);
-            if (!dnf_repo_copy_package(pkg, directory, state_loop, error))
+            if (!dnf_repo_copy_package(pkg, directory_slash, state_loop, error))
                 goto out;
             if (!dnf_state_done(state, error))
                 goto out;

Otherwise, dnf_repo_copy_package will be called with directory == NULL and it will construct a bogus destination path.

But even with this patch, downloading from local repositories does not work correctly.

  • It seems that after the download/copy the checksum is trusted to be correct. It is not, and I think the package should be rejected at this point. Does the same happen for remote repositories? I think that would be a bug.

  • The cache directory (directory_slash above)for a local repository is set to /var/lib/broken-repo/packages/, which seems wrong. Libdnf should not write into the repository itself.

  • The checksum wont be correct after the copy, of course, and libdnf will try to download it again and again. But once a file in packages/ exists, a second download will fail with «File exists».

In summary, the behavior with corrupted local repositories is very confusing.

I think libdnf should not try to correct a wrong checksum in a local repository by downloading the package, as it does for remote repositories. It should just give up with a clear error message.

I’ll try to make a PR.

CC @sgallagher

#linux #server #centos #yum #system-administration

Вопрос:

похоже, у него есть проблема с поиском файлов, но я проверил, и это там! я попробовал установить любую вещь,и я получаю одну и ту же ошибку для каждого файла, мне просто нужно установить из локального репозитория, потому что это сервер в автономной среде .

хорошо, я получаю следующую ошибку:

 [root@Nagios-01 yum.repos.d]# yum install php Last metadata expiration check: 0:19:00 ago on Thu 09 Dec 2021 10:29:52 AM IST. Dependencies resolved. =============================================================================================================================================================================================================================================  Package Architecture Version Repository Size ============================================================================================================================================================================================================================================= Installing:  php x86_64 7.4.19-1.module_el8.5.0 815 1c4fd2e5 appstream 1.5 M Installing dependencies:  centos-logos-httpd noarch 85.8-2.el8 baseos 75 k  httpd x86_64 2.4.37-41.module_el8.5.0 977 5653bbea appstream 1.4 M  mod_http2 x86_64 1.15.7-3.module_el8.4.0 778 c970deab appstream 154 k  nginx-filesystem noarch 1:1.20.0-2.module_el8.5.0 899 43b718f6 appstream 25 k  php-common x86_64 7.4.19-1.module_el8.5.0 815 1c4fd2e5 appstream 702 k Installing weak dependencies:  php-cli x86_64 7.4.19-1.module_el8.5.0 815 1c4fd2e5 appstream 3.1 M  php-fpm x86_64 7.4.19-1.module_el8.5.0 815 1c4fd2e5 appstream 1.6 M  php-json x86_64 7.4.19-1.module_el8.5.0 815 1c4fd2e5 appstream 74 k  php-mbstring x86_64 7.4.19-1.module_el8.5.0 815 1c4fd2e5 appstream 484 k  php-opcache x86_64 7.4.19-1.module_el8.5.0 815 1c4fd2e5 appstream 267 k  php-pdo x86_64 7.4.19-1.module_el8.5.0 815 1c4fd2e5 appstream 123 k  php-xml x86_64 7.4.19-1.module_el8.5.0 815 1c4fd2e5 appstream 174 k  Transaction Summary ============================================================================================================================================================================================================================================= Install 13 Packages  Total download size: 9.6 M Installed size: 37 M Is this ok [y/N]: y Downloading Packages: Error opening localhost/root/Repository/appstream/Packages/httpd-2.4.37-41.module_el8.5.0 977 5653bbea.x86_64.rpm: No such file or directory Package "httpd-2.4.37-41.module_el8.5.0 977 5653bbea.x86_64" from local repository "appstream" has incorrect checksum Error opening localhost/root/Repository/appstream/Packages/mod_http2-1.15.7-3.module_el8.4.0 778 c970deab.x86_64.rpm: No such file or directory Package "mod_http2-1.15.7-3.module_el8.4.0 778 c970deab.x86_64" from local repository "appstream" has incorrect checksum Error opening localhost/root/Repository/appstream/Packages/nginx-filesystem-1.20.0-2.module_el8.5.0 899 43b718f6.noarch.rpm: No such file or directory Package "nginx-filesystem-1:1.20.0-2.module_el8.5.0 899 43b718f6.noarch" from local repository "appstream" has incorrect checksum Error opening localhost/root/Repository/appstream/Packages/php-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64.rpm: No such file or directory Package "php-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum Error opening localhost/root/Repository/appstream/Packages/php-cli-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64.rpm: No such file or directory Package "php-cli-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum Error opening localhost/root/Repository/appstream/Packages/php-common-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64.rpm: No such file or directory Package "php-common-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum Error opening localhost/root/Repository/appstream/Packages/php-fpm-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64.rpm: No such file or directory Package "php-fpm-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum Error opening localhost/root/Repository/appstream/Packages/php-json-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64.rpm: No such file or directory Package "php-json-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum Error opening localhost/root/Repository/appstream/Packages/php-mbstring-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64.rpm: No such file or directory Package "php-mbstring-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum Error opening localhost/root/Repository/appstream/Packages/php-opcache-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64.rpm: No such file or directory Package "php-opcache-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum Error opening localhost/root/Repository/appstream/Packages/php-pdo-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64.rpm: No such file or directory Package "php-pdo-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum Error opening localhost/root/Repository/appstream/Packages/php-xml-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64.rpm: No such file or directory Package "php-xml-7.4.19-1.module_el8.5.0 815 1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum Error opening localhost/root/Repository/baseos/Packages/centos-logos-httpd-85.8-2.el8.noarch.rpm: No such file or directory Package "centos-logos-httpd-85.8-2.el8.noarch" from local repository "baseos" has incorrect checksum Error: Some packages from local repository have incorrect checksum [root@Nagios-01 yum.repos.d]#  

мои файлы .repo выглядят следующим образом:

 [extras]  name=CentOS Linux $releasever - Extras baseurl="file://localhost/root/Repository/extras" gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial  

Ответ №1:

Ошибка: Такого файла или каталога нет

Возможно, вы использовали неправильный базовый код, вы можете попробовать

 [extras]  name=CentOS Linux $releasever - Extras baseurl="file:///root/Repository/extras" gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial  

Are you struggling with YUM error performing checksum?

Occasionally while installing a package or updating using YUM command ends up in this error.

The error is usually generated when the checksum algorithm specified in the repository file will not support the yum version.

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

Today, let’s have a quick look at reasons for the occurrence of this error. We’ll also see how our Support Engineers fix the error performing checksum.

Why yum error performing checksum?

Yum stands for Yellowdog Updater, Modified. YUM is a program that manages installation, updates, and removal for Red Hat package manager (RPM) systems.

A checksum is a small-sized datum assigned to any file for the purpose of detecting errors. In other words, when the file goes corrupt, the checksum may not match. Thus it indicates an error.

Generally, yum error performing checksum occurs when we install or update a new package using yum.

The error message appears as:

yum error performing checksum

Often the error happens when installing packages that do not match the server architecture.

The error has been identified when yum update on a Centos5 or RHEL5 box, using RPMs from a repository on a CentOS6 or RHEL6 server (or anywhere else with a more modern createrepo available). Createrepo is a program that creates a repomd (xml-based rpm metadata) repository from a set of RPMs.

In simple words, from the error, it’s clear that the yum is unable to calculate the sha256 checksum. This happens due to the necessary libraries not available for yum to calculate the new checksum correctly.

Let, see how our support engineers help to fix this problem by various methods.

Different methods to fix yum error performing checksum!

At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face problems with the yum error performing checksum.

Now, let’s see the major reasons for this error and how our Support Engineers fix this error by different methods.

1. Installing python-hashlib

Python 2.6 uses hashlib to perform checksums whereas  Python 2.4 uses the SHA module to perform checksums. The version of the SHA module that ships with CentOS 5.3 doesn’t support sha256, that is why we get the checksum error.

Recently, one of the customers had a problem with yum error performing checksum while installing a package using the yum. Installing the python-hashlib package help to add SHA256 capabilities. Therefore our Support Engineers fixed the error by installing python-hashlib to resolve this problem.

yum install python-hashlib

After installing python-hashlib, SHA256 algorithm worked with Yum command. This fixed the error.

2. Removing offending repo

In addition, some customers returned to us with the following error while installing the python-hashlib.

yum install python-hashlib
Loaded plugins: downloadonly-background, fastestmirror, ibm-check-lotus-updates, ibm-repository, refresh-packagekit, security, versionlock
Loading mirror speeds from cached hostfile
Setting up Install Process
Package python-2.6.6-29.el6_3.3.x86_64 already installed and latest version
Nothing to do
[root@xxx ~]#

After further investigations, we found that there was some offending repo created. We disabled some offending repo before installing python-hashlib.

We did the following steps:

1. Initially, we opened the following configuration file and set the enable variable to 0

/etc/yum.repos.d/newNotWorking.repo
enabled=0

2. Then after editing this file, we installed the python-hashlib.

yum install python-hashlib

3. Finally, we re-enabled the new repo

enabled=1

And this fixed the error.

3. Create the repo using sha1

However, in certain situations, where the customer was using a custom repository made by a newer version of “createrepo” causes the same error. Here the repodata checksum had generated with sha256, which was not supported by yum in Centos 5. This leads the customer with the following error:

https://some-repository.com/repodata/6bf3eabf71186292f5559891e9161887b45a647318499e1b0e3b05d6b6e4f62b-primary.sqlite.bz2:
[Errno -3] Error performing checksum

Hence, we re-generated the repo metadata with sha1 checksum by using the following command.

createrepo -d -s sha1 /path/to/repo

After creating repo metadata with sha1, made everything worked as expected

4. Disable epel

The checksum error can happen even with the error in the epel repository. In such cases, an immediate fix is to disable the epel repo.

We can disable either via editing the file as enable=0 or else rename the file. Here we disabled it by renaming the file.

mv /etc/yum.repos.d/epel{,.bak}
yum clean all

We have fixed this error of many customers by disabling epel.

5. Reinstall package

Last, but not the least, often reinstalling the package also can solve the yum error performing checksum. Here, with the reinstall, all the files will be overwritten with the correct files.

[Still having trouble in fixing yum errors? – We’ll help you.]

Conclusion

In short, yum error performing checksum occur due to many reasons. The most common reasons are an unsupported repository with yum version, yum cache and so on. Today, we saw how our Support Engineers fixed 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.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Похоже, у него проблема с поиском файлов, но я проверил, и они есть! я пытался установить любую вещь, и я получаю одну и ту же ошибку для каждого файла, мне просто нужно установить из локального репозитория, потому что это сервер в автономной среде.

Хорошо, поэтому я получаю следующую ошибку:

[root@Nagios-01 yum.repos.d]# yum install php
Last metadata expiration check: 0:19:00 ago on Thu 09 Dec 2021 10:29:52 AM IST.
Dependencies resolved.
=============================================================================================================================================================================================================================================
 Package                                                  Architecture                                 Version                                                                         Repository                                       Size
=============================================================================================================================================================================================================================================
Installing:
 php                                                      x86_64                                       7.4.19-1.module_el8.5.0+815+1c4fd2e5                                            appstream                                       1.5 M
Installing dependencies:
 centos-logos-httpd                                       noarch                                       85.8-2.el8                                                                      baseos                                           75 k
 httpd                                                    x86_64                                       2.4.37-41.module_el8.5.0+977+5653bbea                                           appstream                                       1.4 M
 mod_http2                                                x86_64                                       1.15.7-3.module_el8.4.0+778+c970deab                                            appstream                                       154 k
 nginx-filesystem                                         noarch                                       1:1.20.0-2.module_el8.5.0+899+43b718f6                                          appstream                                        25 k
 php-common                                               x86_64                                       7.4.19-1.module_el8.5.0+815+1c4fd2e5                                            appstream                                       702 k
Installing weak dependencies:
 php-cli                                                  x86_64                                       7.4.19-1.module_el8.5.0+815+1c4fd2e5                                            appstream                                       3.1 M
 php-fpm                                                  x86_64                                       7.4.19-1.module_el8.5.0+815+1c4fd2e5                                            appstream                                       1.6 M
 php-json                                                 x86_64                                       7.4.19-1.module_el8.5.0+815+1c4fd2e5                                            appstream                                        74 k
 php-mbstring                                             x86_64                                       7.4.19-1.module_el8.5.0+815+1c4fd2e5                                            appstream                                       484 k
 php-opcache                                              x86_64                                       7.4.19-1.module_el8.5.0+815+1c4fd2e5                                            appstream                                       267 k
 php-pdo                                                  x86_64                                       7.4.19-1.module_el8.5.0+815+1c4fd2e5                                            appstream                                       123 k
 php-xml                                                  x86_64                                       7.4.19-1.module_el8.5.0+815+1c4fd2e5                                            appstream                                       174 k

Transaction Summary
=============================================================================================================================================================================================================================================
Install  13 Packages

Total download size: 9.6 M
Installed size: 37 M
Is this ok [y/N]: y
Downloading Packages:
Error opening localhost/root/Repository/appstream/Packages/httpd-2.4.37-41.module_el8.5.0+977+5653bbea.x86_64.rpm: No such file or directory
Package "httpd-2.4.37-41.module_el8.5.0+977+5653bbea.x86_64" from local repository "appstream" has incorrect checksum
Error opening localhost/root/Repository/appstream/Packages/mod_http2-1.15.7-3.module_el8.4.0+778+c970deab.x86_64.rpm: No such file or directory
Package "mod_http2-1.15.7-3.module_el8.4.0+778+c970deab.x86_64" from local repository "appstream" has incorrect checksum
Error opening localhost/root/Repository/appstream/Packages/nginx-filesystem-1.20.0-2.module_el8.5.0+899+43b718f6.noarch.rpm: No such file or directory
Package "nginx-filesystem-1:1.20.0-2.module_el8.5.0+899+43b718f6.noarch" from local repository "appstream" has incorrect checksum
Error opening localhost/root/Repository/appstream/Packages/php-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm: No such file or directory
Package "php-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum
Error opening localhost/root/Repository/appstream/Packages/php-cli-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm: No such file or directory
Package "php-cli-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum
Error opening localhost/root/Repository/appstream/Packages/php-common-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm: No such file or directory
Package "php-common-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum
Error opening localhost/root/Repository/appstream/Packages/php-fpm-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm: No such file or directory
Package "php-fpm-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum
Error opening localhost/root/Repository/appstream/Packages/php-json-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm: No such file or directory
Package "php-json-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum
Error opening localhost/root/Repository/appstream/Packages/php-mbstring-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm: No such file or directory
Package "php-mbstring-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum
Error opening localhost/root/Repository/appstream/Packages/php-opcache-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm: No such file or directory
Package "php-opcache-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum
Error opening localhost/root/Repository/appstream/Packages/php-pdo-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm: No such file or directory
Package "php-pdo-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum
Error opening localhost/root/Repository/appstream/Packages/php-xml-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64.rpm: No such file or directory
Package "php-xml-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64" from local repository "appstream" has incorrect checksum
Error opening localhost/root/Repository/baseos/Packages/centos-logos-httpd-85.8-2.el8.noarch.rpm: No such file or directory
Package "centos-logos-httpd-85.8-2.el8.noarch" from local repository "baseos" has incorrect checksum
Error: Some packages from local repository have incorrect checksum
[root@Nagios-01 yum.repos.d]#

Мои файлы .repo выглядят так:

[extras]

name=CentOS Linux $releasever - Extras
baseurl="file://localhost/root/Repository/extras"
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

1 ответ

Ошибка: нет такого файла или каталога

Возможно, вы использовали неправильный baseurl, вы можете попробовать

[extras]

name=CentOS Linux $releasever - Extras
baseurl="file:///root/Repository/extras"
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial


0

hongnhat
10 Дек 2021 в 06:33

Recently I had this issue of checksum error while doing yum update in my RHEL5 servers.

# yum update
Loaded plugins: security
rhel5-local/primary_db                                                                                                                          |    0 B     00:00
ftp://10.8.227.50/pub/LocalYumRepoRHEL5.1/repodata/c7408a1fce29f12df452017556509b3a3ebde95d7d01e8ea0adb052f97c43e86-primary.sqlite.bz2: [Errno -3] Error performing checksum
Trying other mirror.
Error: failure: repodata/c7408a1fce29f12df452017556509b3a3ebde95d7d01e8ea0adb052f97c43e86-primary.sqlite.bz2 from rhel5-local: [Errno 256] No more mirrors to try.

The usaual following way didn’t work for me:

# yum clean all
# yum clean metadata
# yum update

Further I have disabled fastmirror for my yum config and it didn’t work as well:

# grep enabled /etc/yum/pluginconf.d/fastestmirror.conf
enabled=0

I’ve even disabled http cache in yum.conf but same error:

# cat /etc/yum.conf |grep http_caching
http_caching=none

Rebuilding rpm database also was not not helpful:

# rm -rf /var/lib/rpm/__db*
# rpm —rebuilddb
# yum update

But here was my situation, I’ve created local yum repository for RHEL 5 on my RHEL 6 server!

When reading the createrepo manual, we can see:

# man createrepo

 -s —checksum

              Choose the checksum type used in repomd.xml and for packages in the metadata.  The default is now «sha256» (if python has hashlib).  The

              older  default  was  «sha», which is actually «sha1», however explicitly using «sha1» doesn’t work on older (3.0.x) versions of yum, you

              need to specify «sha».

Which was exactly my problem. while creating repositoy for RHEL 5 servers in RHEL 6 server, createrepo command used new hash of SHA256, and it’s not comaptible with yum of RHEL 5 and before:

Solution:

To use createrepo with «-s sha» option in the repo server:

# createrepo -d -s sha /var/ftp/pub/LocalYumRepoRHEL5.1/

and in the client side:

# yum clean all
# yum clean metadata
# yum update

and there issue settled.

Понравилась статья? Поделить с друзьями:
  • Error some other host already uses address centos
  • Error some of application components are missing or corrupted
  • Error solidworks install
  • Error software write protection enabled unable to erase eeprom
  • Error software protect lock feature not valid on this eeprom part