[lug] Library locations

Jeremy Hinegardner jeremy at hinegardner.org
Wed Feb 6 22:57:14 MST 2008


On Wed, Feb 06, 2008 at 04:55:20PM -0700, Zan Lynx wrote:
> 
> On Wed, 2008-02-06 at 16:32 -0700, Jeffrey Haemer wrote:
> > I'm building a package: my company's commercial product, so it's our
> > code, not something off the web.
> > 
> > It includes a shared library, which I eventually need to install on
> > target machines.  Off-hand, I'd have guessed it should go
> > into /usr/local/lib, or maybe /usr/share/lib.  Still, every rpm or
> > Debian package installed on the boxes I have at hand installs
> > libraries right into /usr/lib, which makes me suspect I'm probably
> > wrong.
> > 
> > Can someone explain where I should install my library and why?  I seem
> > to be thinking about it fuzzily.
> 
> I would say that if you plan to install as part of the distro, with a
> RPM or DEB for example, then put your libraries into /usr/lib just like
> a regular package.

I concur here.  If you are installing via the packaging system of the
installed Linux distro (RPM, DEB, etc), then just /usr/{lib,bin} and the
like.  And for the rpm based distros, there are great tools out there
(rpmdevtool, rpmlint) to help you make sure that all the files you
package are in the right locations and marked correctly.

This is essentially what I do for packages at my work.  That way I can
just say 'yum install custom-internal-package' and it installs it
appropriately.  We also are running our own internal yum repository, and
that repo configuration gets installed when any new server build as part
of the kickstart script.

enjoy,

-jeremy


-- 
========================================================================
 Jeremy Hinegardner                              jeremy at hinegardner.org 




More information about the LUG mailing list