I am trying to deal with keeping our RHEL 5 server patched up, but also dealing with our security constraints. This particular server is not allowed to talk to the Internet. So yum isn't really an option.

When we get RHN Alerts, I manually go to Red Hat's portal and view the available packages via Classic Management, and download the necessary RPM's to my workstation, then I FTP them onto the server. This all works well and fine, until a particular dependency is needed that's not included in the packages. For example...

root@myserver:~/rhn-packages $ rpm -Uvh *.rpm    
error: Failed dependencies: libfontenc.so.1 is needed by libXfont-1.2.2-1.0.5.el5_10.i386

Searching in Red Hat's packages for libfontenc doesn't get me anywhere. How do I go about getting this dependency installed?

  • 1
    I'd suggest using Spacewalk to provision your estate with the desired rpm's among other things. I do realize it's nearly undoable having the bureocracy, but, you know... – kaboom Jul 1 '14 at 6:51
  • 1
    This is a perfect use case for a Satellite server or, if you can't afford Satellite, a local repository mirror. – jayhendren Dec 18 '14 at 22:38
  • rpm can only find the capabilities (i.e., shared libraries, perl modules, etc.) that a package provides or requires. You need an extra layer on top of rpm (e.g., yum) to match a package's dependenciess to other packages' provides. If you don't have a local copy of every package you could possibly want to install, you're not going to be able to do this without some kind of external resource. – jayhendren Dec 18 '14 at 22:42
  • Is there a way to download the entire repository onto an external computer and then have yum use that as the repo? – mason Dec 18 '14 at 22:50
  • 1
    That's what a mirror is. – jayhendren Dec 19 '14 at 0:18

Use rpm with -qR keys:

rpm -qRp libXfont-1.2.2*.rpm

To find which dependencies are provided by the package, you can use

rpm -q --provides -p file.rpm

If you want to analyze all the packages that you have, and find what packages provides something that you are looking for, you can do this:

for i in *.rpm
  rpm -q --provides -p $i | grep "look-for-it" && echo $i

And of course, it would be better if you could just use a highlevel dependency manaement system, such as yum that makes all this stuff itself.

  • No, that is not what I am looking for at all. I don't want to see a list of dependencies. I know what the dependency is, my question is how can I figure out what package includes it and find a place to download it from. rpm -qR libXfont-1.2.2*.rpm doesn't seem to work with packages that aren't installed anyways, I get "package libXfont-1.2.2-1.0.5.el5_10.x86_64.rpm is not installed". – mason Feb 4 '14 at 20:05
  • I'm sorry, I've missed p; updated – Igor Chubin Feb 4 '14 at 20:07
  • Like I said, I am not looking for a list of dependencies. I can see that I don't have the required dependency because it specifically told me what I'm missing. What I want to know is where can I find a package that includes the missing .so file? – mason Feb 4 '14 at 20:11
  • updated once again – Igor Chubin Feb 4 '14 at 20:12
  • Let me reiterate again: I know that I do not have the required dependency on my system. I need to know where to download it from. I'm perfectly aware of how yum would make my day easier, but constraints on our system don't allow it to talk to the outside world. – mason Feb 4 '14 at 20:34

You might want to try yumdownloader --resolve <package> to download the needed rpm along with any dependencies as noted in this link.

  • That sounds close to what I'm looking for, except that the server can't talk to the outside world and it's the only Linux machine on our network. Any chance you could run yumdownloader --resolve libXfont-1.2.2-1.0.5.el5_10.i386 and let me know what packages libfontenc.so.1 is in? – mason Feb 4 '14 at 20:40
  • I found libfontenc.so.1 is in this package from rpmfind.net. I didn't find the package specifically for Red Hat though. – Timothy Martin Feb 4 '14 at 21:28
  • Oh man, I'm going to sound like I work for the worst company: our firewall blocks rpmfind.net. I know it's silly, but we're a defense contractor so we have lots of restrictions. Can you please tell me the name of the package? Then I can check on Red Hat's site to see if they have that package. – mason Feb 4 '14 at 21:34
  • Sure, no worries. I found libfontenc.so.1 in libfontenc-1.0.2-2.2.el5.i386.rpm. – Timothy Martin Feb 4 '14 at 21:36
  • I had already searched for packages with libfontenc in the name. The only one I found was libfontenc-devel-1.0.2-2.2.el5 but I guess it doesn't include libfontenc.so.1. I guess I may contact RHN's support. – mason Feb 4 '14 at 21:44

i am also facing same problem and my solution is take list of dependency search in rpmfind.net you can get what the rpm need and go to redhat.com login using redhat account and you have download option on left side top and search for new RPM download wanted RPM install manually one by one

  • This is not a good suggestion, because rpmfind.net will provide answers for a huge number of questionable sources. – mattdm Oct 18 '17 at 2:26

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.