You are not logged in.

#1 2009-09-27 12:52:58

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

pacman query - find a package containing a file [SOLVED 4 years ago]

I spent 10 min in google trying to find out which arch package has the oggdec program.  I finally found it (vorbis-tools), but I was unable to do it with pacman.  I happened across this page for another distro and luckily, the arch package was named the same as the Debian package.

How can I use pacman to find the vorbis-tool package knowing that I want to search for oggdec?  I read the pacman wiki article but didn't find what I'm looking for.

Last edited by graysky (2013-11-22 10:49:51)

Offline

#2 2009-09-27 12:59:36

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,671
Website

Re: pacman query - find a package containing a file [SOLVED 4 years ago]

There is no feature in pacman to do that.  Install "pkgtools" and use the pkgfile script.

Offline

#3 2009-09-27 16:16:50

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: pacman query - find a package containing a file [SOLVED 4 years ago]

The data searched by pkgfile used to be available on the web page for each package. I miss that.

Offline

#4 2013-11-22 10:19:28

dagelf
Member
Registered: 2013-11-22
Posts: 4

Re: pacman query - find a package containing a file [SOLVED 4 years ago]

# pacman -Ss pkg   

... Find the package. It's not called pkgfile.

# pacman -S pkgfile
resolving dependencies...
looking for inter-conflicts...
... installed

# pkgfile uuencode
extra/sharutils

# pacman -S sharutils

Hurray! ...now use the above to automatically print out the command needed to install the needed command by cannibalizing Ubuntu's find-command bash wiring.

Offline

#5 2013-11-22 10:22:28

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,671
Website

Re: pacman query - find a package containing a file [SOLVED 4 years ago]

Or...  use the one pkgfile gives you:

/usr/share/doc/pkgfile/command-not-found.bash

Offline

#6 2013-11-22 10:51:07

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: pacman query - find a package containing a file [SOLVED 4 years ago]

Allan wrote:

Or...  use the one pkgfile gives you:

/usr/share/doc/pkgfile/command-not-found.bash

For zsh there is also /usr/share/doc/pkgfile/command-not-found.zsh which should be sourced in .zsh. Pure gold.

Oops, didn't see that the thread is that old...

Last edited by ball (2013-11-22 10:52:01)

Offline

#7 2013-11-22 11:09:31

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: pacman query - find a package containing a file [SOLVED 4 years ago]

ball wrote:

Oops, didn't see that the thread is that old...

Yeah, that's why I tagged it as I did just now tongue  Good thing is that the content is not out-of-date.  Same solution today as 4 years ago.

Offline

#8 2013-11-22 11:13:10

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pacman query - find a package containing a file [SOLVED 4 years ago]

graysky wrote:

Same solution today as 4 years ago.

Not exactly.

Allan wrote:

There is no feature in pacman to do that.  Install "pkgtools" and use the pkgfile script.

dagelf wrote:

# pacman -Ss pkg   

... Find the package. It's not called pkgfile.

I think dagelf meant it's not called pkgtools.

$ sudo pacman -S pkgtools
error: target not found: pkgtools

They are in the AUR now https://aur.archlinux.org/packages/pkgtools/ and pkgfile is a separate package.

Offline

#9 2013-11-22 11:15:47

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: pacman query - find a package containing a file [SOLVED 4 years ago]

I stand corrected...

% pacman -Qo /usr/bin/pkgfile 
/usr/bin/pkgfile is owned by pkgfile 11-1

Offline

#10 2013-11-22 11:21:06

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pacman query - find a package containing a file [SOLVED 4 years ago]

No worries, old threads are expected to get out of date at some point - and that' why you should leave them alone. The wiki should have the current info: https://wiki.archlinux.org/index.php/FA … ge_is_X.3F :-)

Offline

#11 2013-11-22 14:58:52

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: pacman query - find a package containing a file [SOLVED 4 years ago]


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB