how to find which package contains file?

David Kelly dkelly at HiWAAY.net
Mon Apr 14 18:42:13 PDT 2003


On Monday 14 April 2003 08:17 pm, Erik Steffl wrote:
> >
> >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).

Something like this (it will take a while so carefully select the RE you 
use for grep. "perllocal.pod" in this example):

% find /usr/ports -name pkg-plist | xargs grep -l perllocal.pod
/usr/ports/mail/p5-Mail-SpamAssassin/pkg-plist
/usr/ports/astro/p5-Astro-Sunrise/pkg-plist
/usr/ports/audio/p5-CDDB_get/pkg-plist
/usr/ports/databases/p5-DBIx-XHTML_Table/pkg-plist
/usr/ports/devel/autodia/pkg-plist
[...]

Interesting, /usr/local/lib/perllocal.pod exists but "pkg_info -W" 
doesn't know who is responsible. Likely cruft left over from 
portupgrades.

-- 
David Kelly N4HHE, dkelly at hiwaay.net
=====================================================================
The human mind ordinarily operates at only ten percent of its
capacity -- the rest is overhead for the operating system.


More information about the freebsd-questions mailing list