Where to have my .so files install?

cpghost cpghost at cordula.ws
Sat Apr 19 00:47:33 UTC 2008

On Fri, 18 Apr 2008 20:24:09 -0400
"Aryeh M. Friedman" <aryeh.friedman at gmail.com> wrote:

> Adam J Richardson wrote:
> > Hi all.
> >
> > I'm writing a program which uses .so files as plugins. Now I need
> > to decide where on the filesystem to install the plugins. I don't
> > want to clutter the system locations like /lib and /usr/lib. Can
> > anyone suggest a decent install location? Google doesn't help much
> > with this.
> >
> > TiA,
> > Adam J Richardson
> /usr/local/lib

To expand a bit: don't put your own stuff in /lib or /usr/lib,
since this is used by FreeBSD's userland itself. On FreeBSD,
third party stuff goes into /usr/local/{lib,bin,etc,...}.
See hier(7).

As to plugins: if you've got many of them, it's better to group
them in a subdirectory of /usr/local/lib:
and dlopen(3) them using this path.


Cordula's Web. http://www.cordula.ws/

More information about the freebsd-questions mailing list