freedomson
freedomson

Reputation: 57

CentOS yum fails to install rpm - Package does not match intended download [Errno 256]

Error message:

Downloading Packages: http://myserver/pulp/repos/test/el6/x86_64/dev/mypackage.2.0.0.noarch.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=test clean metadata

Trying other mirror. Error Downloading Packages: mypackage.2.0.0.noarch: failure: mypackage.2.0.0.noarch.rpm from myrepo: [Errno 256] No more mirrors to try.

Fixed by removing old package and installing the new one:

yum clean all
yum remove mypackage.1.0.0.noarch
wget http://myserver/pulp/repos/test/el6/x86_64/dev/mypackage.2.0.0.noarch.rpm
yum install mypackage.2.0.0.noarch.rpm

Upvotes: 0

Views: 4040

Answers (3)

Birendra Rawat
Birendra Rawat

Reputation: 1447

When you update or downgrade npm package then we get this kind of errors.

We can remove this error by below steps:

Upvotes: 0

Diazed
Diazed

Reputation: 76

Came accross this Error myself today.

wget was no acceptable workaround for us. The Error appeared right after we started to GPG sign our packages. We simply messed up the workflow.

Make sure to GPG Sign your packages before calling createrepo.

After correcting this we were able to install our packages via yum as expected.

Upvotes: 0

Mir Adnan
Mir Adnan

Reputation: 884

You need to install RPM like

Install

rpm -i mypackage.2.0.0.noarch.rpm

If you want to remove you package

rpm -e $(rpm -qa 'mypackage*')

If you want to install via yum. Then you need to have your repository setup first. You would need a mypackage.repo file. Something like below and place your rpm files under it. Then use createrepo to build yum repos.

[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

Then, you will be able to install packages via yum.

Upvotes: 0

Related Questions