Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
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... –  ror6ax Jul 1 at 6:51

2 Answers 2

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
do
  rpm -q --provides -p $i | grep "look-for-it" && echo $i
done

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.

share|improve this answer
    
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 at 20:05
    
I'm sorry, I've missed p; updated –  Igor Chubin Feb 4 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 at 20:11
    
updated once again –  Igor Chubin Feb 4 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 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.

share|improve this answer
    
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 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 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 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 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 at 21:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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