What port contains libxcb.so.2, and hoow could I figure this out?

Warren Block wblock at wonkity.com
Tue Dec 29 16:32:54 UTC 2009


On Tue, 29 Dec 2009, stan wrote:

> One of my machines is suddenly complaining that it can't find libxcb.so.2.
> This is probably an issue related to a recent attempt to update the software
> on this machine, so I figured I'd just rebuild the port that provides this
> library, but I can't figure out how to determine which on that would be.
>
> I have the feeling that I should be able to use pkg_info for this, but I
> can't seem to figure out how to accomplish this. Is this the right tool? If
> so, how do I use it for this, if not, what is the correct tool?

pkg_which will do it if you can provide the full path to the missing 
file.  Which is easy if you already have the file installed and can find 
the full path (locate libxcb.so.2), but not so easy if it's missing.

Sometimes, a simple "whereis" will help:

% whereis libxcb
libxcb: /usr/ports/x11/libxcb

If the port is missing or outdated, pkgdb -F ought to let you install 
it.

And of course there's always crushing brute force:

% find /usr/ports -name pkg-plist -exec grep libxcb.so.2 {} +
/usr/ports/x11/libxcb/pkg-plist:lib/libxcb.so.2

-Warren Block * Rapid City, South Dakota USA


More information about the freebsd-questions mailing list