Let's say I'm building and installing some third-party software called foo
. I want headers in /usr/local/include/foo
, shareable read-only data in /usr/local/share/foo
, and so on. But let's say foo
insists on being difficult and wants me to pick a directory PREFIX
and install stuff in ${PREFIX}/include
and ${PREFIX}/share
and so on. If I choose PREFIX=/usr/local
then it might clobber some existing files in /usr/local/include
, /usr/local/share
, and so on. Are there best practices for where PREFIX
should be?
That is what
/opt
is for. Make a directory inside/opt
for the self-contained software package. You'll have to add/opt/*/bin
to yourPATH
manually.