title: an error while yum install from local repository on CentOS 8
body: <p>looks like it has issue to find the files but i checked and its there! i tried just any thing to install and i get the same error for every file,i just have to install from local repository because its a server within an offline environment .</p>
  <p>ok so i get the following error:</p>
  <pre><code>[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 &quot;httpd-2.4.37-41.module_el8.5.0+977+5653bbea.x86_64&quot; from local repository &quot;appstream&quot; 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 &quot;mod_http2-1.15.7-3.module_el8.4.0+778+c970deab.x86_64&quot; from local repository &quot;appstream&quot; 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 &quot;nginx-filesystem-1:1.20.0-2.module_el8.5.0+899+43b718f6.noarch&quot; from local repository &quot;appstream&quot; 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 &quot;php-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64&quot; from local repository &quot;appstream&quot; 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 &quot;php-cli-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64&quot; from local repository &quot;appstream&quot; 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 &quot;php-common-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64&quot; from local repository &quot;appstream&quot; 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 &quot;php-fpm-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64&quot; from local repository &quot;appstream&quot; 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 &quot;php-json-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64&quot; from local repository &quot;appstream&quot; 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 &quot;php-mbstring-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64&quot; from local repository &quot;appstream&quot; 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 &quot;php-opcache-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64&quot; from local repository &quot;appstream&quot; 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 &quot;php-pdo-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64&quot; from local repository &quot;appstream&quot; 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 &quot;php-xml-7.4.19-1.module_el8.5.0+815+1c4fd2e5.x86_64&quot; from local repository &quot;appstream&quot; 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 &quot;centos-logos-httpd-85.8-2.el8.noarch&quot; from local repository &quot;baseos&quot; has incorrect checksum
  Error: Some packages from local repository have incorrect checksum
  [root@Nagios-01 yum.repos.d]#
  </code></pre>
  <p>my .repo files look like this:</p>
  <pre><code>[extras]
  
  name=CentOS Linux $releasever - Extras
  baseurl=&quot;file://localhost/root/Repository/extras&quot;
  gpgcheck=1
  enabled=1
  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
  </code></pre>