LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 01-10-2003, 11:53 AM   #1
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Rep: Reputation: 31
how to find a file in an rpm?


hi,
Often I want to find the rpm which contains a given file.
If the package is installed, there is no problem rpm -qa --filesbypkg | grep file

but if the package is not installed how to find the package ?


thanks for help

bela

 
Old 01-10-2003, 11:55 AM   #2
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Original Poster
Rep: Reputation: 31
another one

To install the gaim-applet needs

libpanel_applet.so.0 is needed by gaim-applet-0.59.8-1

where is it please

bela
 
Old 01-10-2003, 10:24 PM   #3
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
Something like this what you mean?

# rpm -qf /bin/ls
fileutils-4.1-10

# rpm -ql fileutils-4.1-10
/bin/chgrp
/bin/chmod
/bin/chown
/bin/cp
/bin/dd
...
 
Old 01-11-2003, 01:41 AM   #4
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Original Poster
Rep: Reputation: 31
not exactly,
suppose the ls command is not installed, and i want to search the rpm which contains it ( I suppose not know fileutils ) the goal is precisely to find it.

thanks
bela
 
Old 01-11-2003, 12:21 PM   #5
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
OK.. So you want command "xyz" but the RPM containing that command is *not* installed and you want to know which RPM will give you command "xyz"? No easy way to do that I suppose... Do the "rpm -qf" on a system which does have the RPM installed I guess.
 
Old 01-11-2003, 01:05 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
hmm, some slightly odd suggestions... rpm itself doesn't have a feature to do what you want but you can do something such as:
Code:
[chris@trevor chris]$ rpm2cpio wxGTK-gl-2.3.2-1.i386.rpm | cpio --list
./usr/lib/libwx_gtk_gl-2.3.a
./usr/lib/libwx_gtk_gl-2.3.so
./usr/lib/libwx_gtk_gl-2.3.so.1
./usr/lib/libwx_gtk_gl-2.3.so.1.0.0
116 blocks
[chris@trevor chris]$
BUT how you find what you actually need to know is to go to rpmfind.net and enter the file that you require, and you'll be given a list of pacakges that contains it. either then download the right one there, or install the equivalent package from your distro cd's.
 
Old 01-11-2003, 01:13 PM   #7
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Sorry, didn't see that you were given the same advice right above...

<redundant>
Dude, go to www.rpmfind.net, type the name of the file you need in the search box, and if that file is in any RPM available it will tell you which one. (and let you download it...)
</redundant>

Last edited by bulliver; 01-11-2003 at 01:16 PM.
 
Old 01-11-2003, 01:18 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
bulliver, it'd be dumb to give wrong advice, but not correct advice...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find an installed .rpm file Gald3r Linux - Newbie 22 09-25-2005 12:19 AM
HELP! Need to find rpm file! mr_zx9r Linux - Newbie 5 06-15-2004 09:31 PM
where to find a tar-file in a rpm sneezesnoeze Linux - Newbie 1 04-06-2004 11:18 AM
RPM Spec file creation: %file section question davidas Linux - Newbie 0 03-16-2004 10:36 PM
Installed RPM/tar file, cant find out how to run it Craneology Linux - Software 4 03-01-2003 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 03:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration