how to find which package contains file?
Joe Marcus Clarke
marcus at marcuscom.com
Mon Apr 14 18:23:30 PDT 2003
On Mon, 2003-04-14 at 21:17, Erik Steffl wrote:
> Joe Marcus Clarke wrote:
> >On Mon, 2003-04-14 at 21:03, Erik Steffl wrote:
> >> is it possible to find which package contains file?
> >> Let's say I know that I need libiconv.so.1 library (just an example),
> >>which package do I need to install?
> >If you have the package and file already installed on your system:
> >pkg_info -W /path/to/file
> thanks but what about the situation described abovwe - when I am
> trying to find which package to install when there's some file missing?
> (usually a library but could be something else).
Ah, then (and there are probably better ways, but this came to mind
find . -maxdepth 3 -name pkg-plist | xargs grep <filename>
Note, things like libraries aren't a good choice, since their version is
likely to change. However, given your libiconv example:
find . -maxdepth 3 -name pkg-plist | xargs grep "libiconv\.so"
Note, simply installing libiconv won't fix your issue as the app in
question wants libiconv.so.1. In that case, it's best to also update
the app that depends on the old version of the library. Checkout
sysutils/portupgrade for a suite of tools that will help you manage your
ports and packages.
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
PGP Key : http://www.marcuscom.com/pgp.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030414/b88306ad/attachment.bin
More information about the freebsd-questions