[rhn-users] How to check which rpm is required?

Jesse Becker jbecker at northwestern.edu
Wed Apr 20 21:13:43 UTC 2005


On Fri, Apr 15, 2005 at 03:02:41PM -0700, chirag thakkar wrote:
> For now i know that this file is provided by perl-ldap-0.31-1.0.rh7.dag. rpm 
> The way i cud find :--
> 1. This file existed on some other machine i have.
> 2. there i did  
> locate LDAP.pm
> then rpm -q --whatprovides /usr/lib/perl5/vendor_perl/5.6.1/Net/LDAP.pm .
>  
> But say i dont have this file on any of my machines; then where do i go from here.

Then you need to hunt around via other means, of which there are a few.

You can try rpmfind.net, or rpm.pbone.net, and hunt for things yourself.  

There's a nice little program called 'cpan2rpm' that packages Perl modules
from CPAN, and builds RPMs out of them:
	http://perl.arix.com/cpan2rpm/

If you have a large local repository of RPMs (for whatever reason), you can
run your own searching program.  The code that runs rpmfind.net (rpm2html) is available
on that site (rpmfind and rpm2html).  I found it cumbersome, and slow, so I
wrote my own:  http://hunterpm.sf.net/.  It works for me, on an archive of
about 38,0000 packages.

> Also it has happened at times that multiple rpms were missing for running a perl file.
> Is there a way to find the entire list of required & / or missing rpms in one go .. rather than having one error / missing rpm at a time..

The cpan2rpm program can automatical.y follow dependencies.  This is more a
function of CPAN, than of RPM though.

> One more question: (sorry i have just too many ... ) how can i modify
>@INC variable without using use lib qw (path to the .pm).  I wud like
>to know if there is another way.

Use the -I flag when invoking perl:

	perl -I/some/other/path script.pl

It is documented in the 'perlrun' man page, or via perldoc.

-- 
Jesse Becker
GPG-fingerprint: BD00 7AA4 4483 AFCC 82D0  2720 0083 0931 9A2B 06A2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/rhn-users/attachments/20050420/4fa246b3/attachment.sig>


More information about the rhn-users mailing list