LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-04-2011, 05:05 AM   #1
jascas
LQ Newbie
 
Registered: Mar 2011
Posts: 10

Rep: Reputation: 0
Find rpm package on Linux


Hi,

I am trying to find the location of a package on my linux machine. There are several commands that i have tried like 'rpm -ql kernel-headers-2.6.32-71.18.1.el6.x86_64' but this is no good.

I also tried the following command 'rpm2cpio kernel-headers-2.6.32-71.18.1.el6.x86_64 | cpio --list! But I get a msg saying "kernel-headers-2.6.32-71.18.1.el6.x86_64: No such file or directory"

So I decided to download the rpm and when I tried to install it I get "package kernel-headers-2.6.32-71.18.1.el6.x86_64 is already installed"

Is there any way I can find out the location of this file??? It is not in any of the /usr folders (bin, lib, lib64, include etc...)

Thanks!
 
Old 03-04-2011, 05:25 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by jascas View Post
I am trying to find the location of a package on my linux machine. There are several commands that i have tried like 'rpm -ql kernel-headers-2.6.32-71.18.1.el6.x86_64' but this is no good.
What does "no good" mean? Any error message? What if you try simply...?
Code:
rpm -ql kernel-headers
 
Old 03-04-2011, 05:36 AM   #3
jascas
LQ Newbie
 
Registered: Mar 2011
Posts: 10

Original Poster
Rep: Reputation: 0
What I mean by "no good" is that it just brings back 100's of files with in the /usr subfolders. Here is an example of what i mean.
"/usr/include/linux/virtio_blk.h
/usr/include/linux/virtio_config.h
/usr/include/linux/virtio_console.h
/usr/include/linux/virtio_ids.h
/usr/include/linux/virtio_net.h
/usr/include/linux/virtio_pci.h
/usr/include/linux/virtio_ring.h
/usr/include/linux/virtio_rng.h"

That command you said to try also produced the same results, these don't tell me the location of the package I want

To find a file I would use 'find / . -name <fileName>'. Is there nothing like that for packages?
 
Old 03-04-2011, 05:48 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
A package has no location, when installed. The installed files have.

The package kernel-headers is "unusual" as it has files in /usr/include/ only.
Other packages can have files in many locations.

"Where is the information of the installed package stored" :
Is that your question ?
The answer is : The rpm data base, in a non readable binary format.

..
 
Old 03-04-2011, 05:51 AM   #5
Ashkan_s
Member
 
Registered: Jul 2008
Distribution: Fedora
Posts: 77

Rep: Reputation: 22
An rpm package consists of multiple files. When you install it, each file is placed in a location that is defined in the package.

In this case some files are in /usr/include/linux and some files are in /usr/include/asm and ... .
 
Old 03-04-2011, 05:52 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Or do you want to save a package ?
Then edit /etc/yum.conf to keepcache=1

Then the packages are saved in /var/cache/yum/<repo-name>/packages/
 
Old 03-04-2011, 05:53 AM   #7
jascas
LQ Newbie
 
Registered: Mar 2011
Posts: 10

Original Poster
Rep: Reputation: 0
So the problem that I am having is that VMWare is looking for this package but I can' seem to be able to point it to where this package is. I have attached a screen shot of the msg I try to start up VMWare.

Thanks!
Attached Thumbnails
Click image for larger version

Name:	RPM_Package.png
Views:	21
Size:	229.7 KB
ID:	6306  
 
Old 03-04-2011, 06:00 AM   #8
Ashkan_s
Member
 
Registered: Jul 2008
Distribution: Fedora
Posts: 77

Rep: Reputation: 22
In the picture VMware needs kernel headers 2.6.32-71.14.1.el6.x86_64 but you have 2.6.32-71.18.1.el6.x86_64 installed.
 
Old 03-04-2011, 06:02 AM   #9
jascas
LQ Newbie
 
Registered: Mar 2011
Posts: 10

Original Poster
Rep: Reputation: 0
Ok, let me check
 
Old 03-04-2011, 06:02 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
It's just the VMWare installer, that by mistake uses the name 'Kernel Headers'.

# yum install kernel-devel

Which will provide the required files in /usr/src/kernels/
 
Old 03-04-2011, 08:55 AM   #11
jascas
LQ Newbie
 
Registered: Mar 2011
Posts: 10

Original Poster
Rep: Reputation: 0
@Ashkan_s - It tells me that it found the new version and it is already installed so im still stuck
"package kernel-headers-2.6.32-71.18.1.el6.x86_64 (which is newer than kernel-headers-2.6.32-71.14.1.el6.x86_64) is already installed"

@knudfl - When I get that command it says "Package kernel-devel-2.6.32-71.18.1.el6.x86_64 already installed and latest version"
In th VM software when I browse to "/usr/src/kernels" it just throws an error.

Any other suggestions?
 
Old 03-04-2011, 09:08 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
How can the VMWare installer ask for "2.6.32-71.14.1.el6.x86_64"

if you have kernel-2.6.32-71.18.1.el6.x86_64 ?

I.e. "kernel-devel" must match the running kernel.

What is your output from the command : 'uname -r' ?
And may be : 'uname -a' too.

..
 
Old 03-04-2011, 09:30 AM   #13
jascas
LQ Newbie
 
Registered: Mar 2011
Posts: 10

Original Poster
Rep: Reputation: 0
For 'uname -r' I got "2.6.32-71.14.1.el6.x86_64"

For 'uname -a' I got "Linux <hostname> 2.6.32-71.14.1.el6.x86_64 #1 SMP Mon Jan 17 14:23:04 BRST 2011 x86_64 x86_64 x86_64 GNU/Linux"

It looks like its saying that a newer version is installed but my VMware is looking for the old version.

Last edited by jascas; 03-08-2011 at 10:44 AM. Reason: had my hostname in the text.
 
Old 03-04-2011, 10:26 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
'uname -r' I got "2.6.32-71.14.1.el6.x86_64"
The working kernel is 'kernel-2.6.32-71.14.1.el6.x86_64'.

So how come you installed a later kernel-devel ? (2.6.32-71.18.1).
That would usually not be possible, unless you do manual package install ?

Suggest :
# yum install kernel : Will update to the latest version. ( 2.6.32-71.18.1 )

Next : Reboot, and you can continue.

..
 
Old 03-04-2011, 10:28 AM   #15
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Quote:
Originally Posted by jascas View Post
Hi,

I am trying to find the location of a package on my linux machine. There are several commands that i have tried like 'rpm -ql kernel-headers-2.6.32-71.18.1.el6.x86_64' but this is no good.

I also tried the following command 'rpm2cpio kernel-headers-2.6.32-71.18.1.el6.x86_64 | cpio --list! But I get a msg saying "kernel-headers-2.6.32-71.18.1.el6.x86_64: No such file or directory"

So I decided to download the rpm and when I tried to install it I get "package kernel-headers-2.6.32-71.18.1.el6.x86_64 is already installed"

Is there any way I can find out the location of this file??? It is not in any of the /usr folders (bin, lib, lib64, include etc...)

Thanks!
Code:
rpm -qa|grep kernel
This will give you the correct package name.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find Installed Location of RPM Package in Unix suman5u Linux - Newbie 2 03-26-2010 04:28 AM
RPM Tool Can't find package that is there esperco Linux - Newbie 4 09-11-2006 08:04 PM
How to find corresponding rpm package stewchcken Linux - Software 3 07-13-2005 11:50 PM
Adding a package so rpm can find it dangerousdave Linux - Newbie 2 02-22-2005 11:39 AM
how to find all files and programs in a package (RPM) 1kyle Linux - Software 1 07-13-2004 04:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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