What is the standard place for static library files on Unix/Ubuntu
I am trying to install a library manually, well actually just put it in a sensible location preferably in my lib
path.
I have a lib[...].a
file and a bunch of headers pertaining to that static library file. If I look under /usr/lib/
I see only .so
files, likewise for /lib/
, /lib32/
etc. I figure I could chuck it in there, but is there any place where it can get cozy with other .a
files or is that as good place as any? I'm not an library expert, but I'm pretty sure it won't matter functionally, but I'd like to learn conventional best practice. Also, where is the standard place to put the headers?
Static libraries belong next to their corresponding dynamic libraries, and in accordance with the FHS. Keep in mind that static libraries are usually only needed to build software, not run it.
Incidentally: don't put anything you install manually in /usr/lib
or /lib
, where the package management system installs things; put it in /usr/local
, that's what it is for.