You are not logged in.

#1 2011-01-04 21:33:39

helloworld1
Member
Registered: 2010-12-26
Posts: 72

[SOLVED] Why can't pacman query if a file belongs to a package in repo

I can query the files of packages that is installed on my system. But sometimes I want to know which package contains a file. For example:
A program complains about the libz.so.1, I want to find out which package contains the libz.so.1.

In fedora's yum, I can do that. But pacman can't do since there is no pacman -Ql like command that works for packages in repo.

I am curious why. When I looked into
/var/lib/pacman/local/
I can find a files file which has all the files.
But in
/var/lib/pacman/sync/
The packages do not have "files" file.

Last edited by helloworld1 (2011-01-04 21:46:56)

Offline

#2 2011-01-04 21:34:48

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] Why can't pacman query if a file belongs to a package in repo

pacman -Qo

doesn't do what you need ?? You probably need to go through manpages of pacman.

If by repo you mean external repos then I am not sure if pacman handles it or not. but they are external and so pacman doesn't need to support them


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2011-01-04 21:37:47

helloworld1
Member
Registered: 2010-12-26
Posts: 72

Re: [SOLVED] Why can't pacman query if a file belongs to a package in repo

Inxsible wrote:
pacman -Qo

doesn't do what you need ??

The problem is that pacman -Q only look up the locally installed packages. If I haven't installed, it cannot do.

-Q, --query
           Query the package database. This operation allows you to view
           installed packages and their files, ....

Last edited by helloworld1 (2011-01-04 21:38:04)

Offline

#4 2011-01-04 21:41:42

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] Why can't pacman query if a file belongs to a package in repo

Aah ! I see what you want now.

I am not sure if this will work. But try the

pacman -Ssp 

command and see if it works but I am not sure if it will print the files or just the info


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#5 2011-01-04 21:41:43

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED] Why can't pacman query if a file belongs to a package in repo

@helloworld1 pkgfile from pkgtools packages can do that.


Give what you have. To someone, it may be better than you dare to think.

Offline

#6 2011-01-04 21:41:58

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED] Why can't pacman query if a file belongs to a package in repo

Try pkgfile from the community/pkgtools package if pacman -Qo fails. It can report packages some file belongs to even if it was not currently installed (through pacman).

Edit: Beaten by seconds! sad

Last edited by bernarcher (2011-01-04 21:42:49)


To know or not to know ...
... the questions remain forever.

Offline

#7 2011-01-04 21:46:39

helloworld1
Member
Registered: 2010-12-26
Posts: 72

Re: [SOLVED] Why can't pacman query if a file belongs to a package in repo

Ah, thank you very much. That's exactly what I want.

Offline

#8 2011-01-15 19:29:24

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: [SOLVED] Why can't pacman query if a file belongs to a package in repo

http://testnet.har-ikkje.net/kittyfile/ … ry=*pacman  (x86_64, db is usually updated every few days)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB