Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Installation & Upgrades
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Installation & Upgrades
For questions about upgrading and installation of your new Ubuntu OS.

 
Thread Tools Display Modes
Old April 17th, 2007   #1
sdide
Gee! These Aren't Roasted!
 
sdide's Avatar
 
Join Date: Sep 2005
Location: Denmark
Beans: 202
Ubuntu Karmic Koala (testing)
apt-? how do I get the feature whatprovides?

Hi,

I need a file X11/xpm.h and I do not know which package provides it.
Is there a command, apt-get or apt-cache, with a certain option/switch, that provides this feature.

something like.

~$ apt-? -apropiateoption "whatprovides" X11/xpm.h
libxpmwhatever
~$

Regards.
__________________
--
Søren Dideriksen | Ubuntu 9.10 | IBM T61p
sdide is offline   Reply With Quote
Old April 17th, 2007   #2
kornhead127
Just Give Me the Beans!
 
kornhead127's Avatar
 
Join Date: Oct 2006
Location: Alhambra, CA
Beans: 66
Ubuntu 9.04 Jaunty Jackalope
Wink Re: apt-? how do I get the feature whatprovides?

I'm guessing you want the X11 pixmap library? If so...
Code:
sudo apt-get install libxpm4
__________________
>Does anyone here speak python?
>>HSSSS SSSSS SssSSSSss HSSSSSss
>The programming language...
>>oh...
kornhead127 is offline   Reply With Quote
Old April 17th, 2007   #3
sdide
Gee! These Aren't Roasted!
 
sdide's Avatar
 
Join Date: Sep 2005
Location: Denmark
Beans: 202
Ubuntu Karmic Koala (testing)
Re: apt-? how do I get the feature whatprovides?

Thanks.
That may be true. (actually I think I need libxpm-dev, but that is beside the point.)
But what i wanted was a tool, that could tell me this, like fedora has "yum whatprovides blablabla"

Does apt have a similar feature?
__________________
--
Søren Dideriksen | Ubuntu 9.10 | IBM T61p
sdide is offline   Reply With Quote
Old April 17th, 2007   #4
kornhead127
Just Give Me the Beans!
 
kornhead127's Avatar
 
Join Date: Oct 2006
Location: Alhambra, CA
Beans: 66
Ubuntu 9.04 Jaunty Jackalope
Re: apt-? how do I get the feature whatprovides?

Damn, you know what I don't think it has a feature like that. May I ask why you would require a piece of source (xpm.h).
__________________
>Does anyone here speak python?
>>HSSSS SSSSS SssSSSSss HSSSSSss
>The programming language...
>>oh...
kornhead127 is offline   Reply With Quote
Old April 19th, 2007   #5
sdide
Gee! These Aren't Roasted!
 
sdide's Avatar
 
Join Date: Sep 2005
Location: Denmark
Beans: 202
Ubuntu Karmic Koala (testing)
Re: apt-? how do I get the feature whatprovides?

I needed xpm.h, because I wanted to compile bbbutton. But its a shame that I can't get apt to do this for me.
yum - which I usually consider inferior, has this nice feature.

oh well. Thanks anyways.
__________________
--
Søren Dideriksen | Ubuntu 9.10 | IBM T61p
sdide is offline   Reply With Quote
Old April 19th, 2007   #6
eentonig
Extra Foam Sugar Free Ubuntu
 
eentonig's Avatar
 
Join Date: Apr 2006
Location: Belgium
Beans: 803
Hardy Heron (Ubuntu Development)
Re: apt-? how do I get the feature whatprovides?

Quote:
sudo apt-get update
apt-cache search <keyword>
Will let you search packages in the repositories. It searches the name and description of the available packages.
__________________
How do I install <program X> || I want a script!! || Chinese isn't ready for the desktop
'Eentonig' means boring in Dutch
eentonig is offline   Reply With Quote
Old April 20th, 2007   #7
sdide
Gee! These Aren't Roasted!
 
sdide's Avatar
 
Join Date: Sep 2005
Location: Denmark
Beans: 202
Ubuntu Karmic Koala (testing)
Re: apt-? how do I get the feature whatprovides?

Yeah, I guess apt-cache search is the closest I'll get.
However it doesn't catch what files are provided by each package. Maybe its because the information provided in the package desciption - the one apt-cache search does regex search through - does not contain which files are provided with that package.

so
~$ apt-cache search ".*xpm.h"

returns nothing even though, the package libxpm-dev installs that file, and its actually located in
/usr/include/X11


however the command
~$ dpkg-query -S "*xpm.h"

returns
libxpm-dev: /usr/include/X11/xpm.h

Which is great, only - thats what it returns because I have the package already installed! If I remove the package it returns nothing, so it is no good.

What i needed was a feature that could return this result before I installed the package...

Solution install EVERY package, make a list of packages installed find out which one contained the file, and the remove all other packages again.
Which is ofcourse - retarded.
__________________
--
Søren Dideriksen | Ubuntu 9.10 | IBM T61p
sdide is offline   Reply With Quote
Old April 22nd, 2007   #8
kb00heda
Ubuntu Espresso Roast
 
Join Date: Mar 2005
Beans: 79
Re: apt-? how do I get the feature whatprovides?

Hi,

This is not the solution to your query, but at least---I guess---it is an acceptable workaround:

Visit

http://packages.ubuntulinux.org

and use the "Search the contents of packages" option. The keyword could be "xpm.h", in which case a search among the Feisty packages would tell us that, e.g., "libxpm-dev" provides this file.

But I agree: This nice feature should really be available from the CL using apt/aptitude. (And probably it is... but we have still to figure it out!)

Best regards,
David
kb00heda is offline   Reply With Quote
Old March 5th, 2008   #9
milstead
5 Cups of Ubuntu
 
Join Date: Nov 2005
Beans: 16
Ubuntu Breezy 5.10
Re: apt-? how do I get the feature whatprovides?

The functionality you were looking for is supplied by apt-file. To install:

sudo apt-get install apt-file

To use:

sudo apt-file update

sudo apt-file search <filename>

Enjoy,

Tim.
milstead is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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

Forum Jump


All times are GMT -4. The time now is 01:28 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry