LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-26-2009, 10:28 AM   #1
mrider
LQ Newbie
 
Registered: Oct 2006
Distribution: Debian
Posts: 28

Rep: Reputation: 1
How to know which package to install to get a specific file


Greetings all:

I know this has been asked a million times, but I just can't seem to get a hit with various Google searches. Sorry.

Okay, so I need to get the XTest library headers onto my computer so I can compile an outside package. Specifically I need XTest.h. I know how to figure out which package owns XTest.h once it's installed (dpkg -S XTest.h), but how the heck can I figure out which package contains that file if it's not yet installed?

FWIW, after a while I figured out that file by looking at a machine where it was already installed - but it sure seems like there would be an easy way to find it. I tried:

apt-cache search XTest.h <- No hits
apt-cache search XTest <- Several hits, none have the header files


Can someone give me a hint? Maybe point to a tutorial or man page?

TIA
 
Old 08-26-2009, 10:31 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
http://www.debian.org/distrib/packages#search_contents
 
Old 08-26-2009, 10:40 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979
Code:
$ sudo apt-file search XTest.h
libbcprov-java-doc: /usr/share/doc/libbcprov-java-doc/api/org/bouncycastle/jce/provider/test/PKIXTest.html
openoffice.org-dev-doc: /usr/share/doc/openoffice.org-dev/docs/common/ref/com/sun/star/test/XTest.html
x11proto-xext-dev: /usr/include/X11/extensions/XTest.h
This on a Ubuntu 8.04 LTS. It can search for files provided both by installed and not-installed packages.

Last edited by colucix; 08-26-2009 at 10:41 AM.
 
Old 08-26-2009, 10:41 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296
Hello,

A utility I use pretty often is apt-file. Install it with
Code:
apt-get install apt-file
After installation run
Code:
apt-file update
and you're ready to search.
The search for your file gave me following result
Code:
apt-file search XTest.h
libbcprov-java-doc: /usr/share/doc/libbcprov-java-doc/api/org/bouncycastle/jce/provider/test/PKIXTest.html
openoffice.org-dev-doc: /usr/share/doc/openoffice.org-dev/docs/common/ref/com/sun/star/test/XTest.html
x11proto-xext-dev: /usr/include/X11/extensions/XTest.h
The last line indicates that the package you need is x11proto-xext-dev.

Kind regards,

Eric

Colucix beat me to it.

Last edited by EricTRA; 08-26-2009 at 10:42 AM. Reason: Beaten by Colucix
 
Old 08-26-2009, 10:44 AM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Install apt-file
Code:
apt-get install apt-file
apt-file search XTest.h

Last edited by repo; 08-26-2009 at 10:59 AM.
 
Old 08-26-2009, 10:50 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979
Quote:
Originally Posted by EricTRA View Post
Colucix beat me to it.
No no... don't break the wall... nevertheless your post were more informative than mine...
 
Old 08-26-2009, 10:54 AM   #7
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296
thank you so much, I feel a lot better now, aside from the headache
 
Old 08-26-2009, 10:55 AM   #8
mrider
LQ Newbie
 
Registered: Oct 2006
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 1
Wow! Thanks everyone! I subscribed to this thread and hadn't even gotten a notification yet.

I knew I had to be missing something easy.
 
Old 08-26-2009, 11:01 AM   #9
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
Quote:
Originally Posted by mrider View Post
Wow! Thanks everyone! I subscribed to this thread and hadn't even gotten a notification yet.

I knew I had to be missing something easy.
Hi there

Glad you found your solution!

For your information, every thread you post into, gets added to your subscribed-threads list, but you won't necessarily get any notifications unless you specifically make it so via your user profile, or by manually selecting "Email Notification" on a given thread.

If you DO want email notification, just enable it in your profile. Note that notifications may lag behind actual posts, depending on server load and other factors.

Again, good to see you have your answer -- and if you like, you can mark your thread [solved] by using the "Thread Tools" drop-down menu at the top

Regards,
Sasha
 
Old 08-26-2009, 11:13 AM   #10
mrider
LQ Newbie
 
Registered: Oct 2006
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 1
Oh, thanks. I went to subscribe to this page and found that I was already subscribed. Not surprising considering that I started the thread. I didn't realize or notice that I had to add email notifications to the subscription.

On a side note, I notice that the icon next to my post shows Windows. I went offline and changed my user agent. It kind of looks bad posting here with that darn icon.

[EDIT]Hmm, still shows Windows. Oh well, I must have missed something.

Last edited by mrider; 08-26-2009 at 11:14 AM.
 
Old 08-26-2009, 11:16 AM   #11
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
It kind of looks bad posting here with that darn icon.
No it doesn't
If you want you can disable the icon in your profile
 
Old 09-04-2009, 07:08 PM   #12
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by mrider View Post

On a side note, I notice that the icon next to my post shows Windows. I went offline and changed my user agent. It kind of looks bad posting here with that darn icon.

[EDIT]Hmm, still shows Windows. Oh well, I must have missed something.
That would be the new feature which is in testing stage. I have also noticed what you have, even after you edit your post using different OS then the one you've used when you first made your post or if you change UA in your browser, (disribution) icon won't change. I guess if this feature will be implemented that that will be fixed.

You can look for the thread about it in the LQ Feedback and suggestions forum.

Last edited by alan_ri; 09-04-2009 at 07:39 PM.
 
Old 09-04-2009, 07:34 PM   #13
milomak
Member
 
Registered: May 2009
Posts: 123

Rep: Reputation: 18
this has proved to be very useful.

many times i have wondered how to search debian packages using apt/aptitude to find what package provides which files. the package site is what i have had to rely on. it has to be said it does the business.

need to remember to run apt-file update

Last edited by milomak; 09-27-2009 at 06:45 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 install specific version of a package using yum? yuriy Linux - Newbie 1 09-26-2008 09:06 AM
How to find out if you have a specific package installed? AriciU Slackware 2 07-08-2007 10:58 PM
YUM Update All But Specific Package jmoschetti45 Linux - Software 1 05-20-2007 04:32 AM
YUM: How to install package from a specific repository? Akhran Red Hat 1 04-16-2007 10:04 PM
How to install a specific package? ricky_ds Red Hat 3 08-22-2005 03:57 AM

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

All times are GMT -5. The time now is 01:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration