1

I am building a Yum repository to install RPM packages.

I am creating a folder mkdir -p ~/yum/el7/x86_64 and moving rpm file to it under same path given above.

Here is my my-app.repo file info.

[my-app]
name=My App
baseurl=https://dl.my-app.com/yum/el7/$basearch
gpgkey=https://dl.my-app.com/rpm.gpg
gpgcheck=1
enabled=1
repo_gpgcheck=1

Here is the error I get when I install the package.

[root@ip-192-31-59-132 ~]# yum install my-app
Loaded plugins: langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package my-app.x86_64 0:1.3.15-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================
 Package                                      Arch                                 Version                                     Repository                                    Size
==================================================================================================================================================================================
Installing:
 my-app                                      x86_64                             1.3.15-2.el7                                my-app                                     9.5 M

Transaction Summary
==================================================================================================================================================================================
Install  1 Package

Total download size: 9.5 M
Installed size: 33 M
Is this ok [y/d/N]: y
Downloading packages:
my-app-1.3.15-2.el7.x8 FAILED                                          
https://dl.my-app.com/yum/el7/x86_64/my-app-1.3.15-2.el7.x86_64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=my-app clean metadata
Trying other mirror.


Error downloading packages:
  my-app-1.3.15-2.el7.x86_64: [Errno 256] No more mirrors to try.

[root@ip-192-31-59-132 ~]# 

I have the Gnupg configuration correct. I hope thats not the cause of this issue.

What am I doing wrong here? Why is Yum throwing Package does not match intended download error?

  • Did you you as suggested: Suggestion: run yum --enablerepo=my-app clean metadata. – Thomas Jan 13 '18 at 9:17
  • Yes. I did that. I even deleted /var/cache/yum – Mir Adnan Jan 13 '18 at 19:54
  • This seems to be an issue with meta-data – Mir Adnan Jan 13 '18 at 20:01
0
# yum clean metadata

and try again. Your client yum(8) has its own idea of the RPM characteristics, so ask it to check their repo value again.

| improve this answer | |
  • I have tried this and yum clean all. Its something to do with metadata – Mir Adnan Jan 15 '18 at 4:07
  • There is something wrong with the package name too. Its show half of it my-app-1.3.15-2.el7.x8 – Mir Adnan Jan 15 '18 at 4:08
  • I am create a new folder and place the .rpm file under it. then running createrepo -v /path/to/rpm and then run it. It works fine. When I move it to S3 I have issues with Package does not match intended download errors – Mir Adnan Jan 15 '18 at 4:09
0

Hashed key of packages after downloading might not match with repository. Retry executing update after clearing metadata.

# yum clean all ; yum update

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.