0

I have a newer version of an rpm that I want to install.

A yum list shows i have xyz-1-10.rpm installed and xyz-2-10.rpm available.

I ran "yum clean all", then ran "yum install xyz-1-11.rpm".

Note that i have a local yum repository, and my yum.repos.d/my.repo looks like:

[my]
     name=My Repository
     baseurl=http://yum.my.com/yum/my/
     gpgcheck=0

Also, when i did a yum search xyz-1-11.rpm, it is listed. So the rpm is in the repository, but it just won't install it.

  • Try yum update first. – schaiba May 2 '13 at 20:11
  • what does that do exactly? – stumped May 2 '13 at 20:13
  • 1
    Please give exact messages. – vonbrand May 2 '13 at 20:27
  • Setting up Install Process Setting up repositories Reading repository metadata in from local files Parsing package install arguments Nothing to do – stumped May 2 '13 at 20:29
  • Have you tried localinstall? – ghm1014 May 2 '13 at 21:01
1

You need to add the line:

enabled=1

For example

[my]
name=My Repository
baseurl=http://yum.my.com/yum/my/
gpgcheck=0
enable=1

My repo's .repo file

[lamolabs]
name=LamoLabs Repo
baseurl=http://www.lamolabs.org/yum-repos/Fedora/14/$basearch
## gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY.lamolabs.org
gpgkey=http://www.lamolabs.org/yum-repos/RPM-GPG-KEY.lamolabs.org
enabled=1
gpgcheck=1

Additional things to do

createrepo

After you've setup a directory, shared it via HTTP, you'll need to run this command in each sub directory of the repo.

createrepo -dp .

I usually use a script like this:

destdir="/home/install_area/linux/yum-repos/Fedora/14"
for arch in i386 x86_64 noarch; do
  printf "\n\n==== creating repo: %-50s [%-s]\n" $destdir $arch
  pushd ${destdir}/${arch} >/dev/null 2>&1
  createrepo -dp .
  popd >/dev/null 2>&1
done

signing

Optionally you can sign your RPMs with this command:

find . -name "*.rpm" -print0 |xargs -0 rpm --resign

Also don't forget to import your RPM key into RPM:

rpm --import RPM-GPG-KEY.lamolabs.org
  • i had actually tried that, then ran yum clean all and the yum install, but it didn't work – stumped May 2 '13 at 20:15
  • i see the rpm i want to install, there. – stumped May 2 '13 at 20:18
  • Not sure who down voted but care to elaborate? Can't improve an answer if you don't say what's wrong. There's a comment I left on May 3rd to the OP to provide more details and thus far they haven't, so we're in a holding pattern until they do so. – slm May 6 '13 at 15:16
1

First off try:

yum list --showduplicates xyz

...this will show all versions of the packages. If the package you want to upgrade to isn't in that list, something is wrong on the repos. side. To upgrade to it you should be able to do:

yum upgrade xyz-1-11.rpm

...although the "yum install" should get to the same point, it's possible there is a bug/feature that is changing that. If you have a newer version of yum you can do:

yum upgrade-to xyz-1-11.rpm

...to make it explicit (as upgrade can be given "from" or "to" packages, and kind of has to guess which one it has been given).

Worst case you can use the versionlock plugin to exclude all the versions of the package apart from the one you want, and then just do a simple "yum upgrade".

Also "yum clean all" is very rarely what you want to do. If you just want to make sure you have the latest repo. metadata you can do "yum clean expire-cache" or (on newer versions of yum) "yum makecache fast".

0

I've run into the same problem.

ENVIRONMENT:

  • RHEL 6.2
  • yum-3.2.29-43-el6_5.noarch

SYMPTOMS:

  • My upstream yum repo has been confirmed to contain my RPM.
  • Other boxes have this RPM install correctly from the same repo.

FAILED INSTALL ATTEMPT METHODS:

  • sudo yum install $RPM => "nothing to do"
  • sudo yum localinstall $RPM => "nothing to do"

WORKAROUND:

  • sudo rpm -i $RPM; rpm -q $RPM => "correctly installed"

No solution here, but at least a workaround...

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.