Is it Conventional to put libraries and include into standard directories like /usr/lib/ after installing a...












1















After installing mesa-12.0.0, I have the library and header files in




~/Downloads/mesa-12.0.0/lib
~/Downloads/mesa-12.0.0/include




Is it better to simply add the path to LD_LIBRARY_PATH or should I put them into more standard paths such as /usr/lib. What is the best way to put organize the package or both are ok ?



Thanks.










share|improve this question

























  • What Operating System+

    – ctrl-alt-delor
    Jan 19 at 13:12
















1















After installing mesa-12.0.0, I have the library and header files in




~/Downloads/mesa-12.0.0/lib
~/Downloads/mesa-12.0.0/include




Is it better to simply add the path to LD_LIBRARY_PATH or should I put them into more standard paths such as /usr/lib. What is the best way to put organize the package or both are ok ?



Thanks.










share|improve this question

























  • What Operating System+

    – ctrl-alt-delor
    Jan 19 at 13:12














1












1








1








After installing mesa-12.0.0, I have the library and header files in




~/Downloads/mesa-12.0.0/lib
~/Downloads/mesa-12.0.0/include




Is it better to simply add the path to LD_LIBRARY_PATH or should I put them into more standard paths such as /usr/lib. What is the best way to put organize the package or both are ok ?



Thanks.










share|improve this question
















After installing mesa-12.0.0, I have the library and header files in




~/Downloads/mesa-12.0.0/lib
~/Downloads/mesa-12.0.0/include




Is it better to simply add the path to LD_LIBRARY_PATH or should I put them into more standard paths such as /usr/lib. What is the best way to put organize the package or both are ok ?



Thanks.







software-installation libraries






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 19 at 13:05









Kusalananda

133k17254417




133k17254417










asked Jan 19 at 12:31









scholar guyscholar guy

62




62













  • What Operating System+

    – ctrl-alt-delor
    Jan 19 at 13:12



















  • What Operating System+

    – ctrl-alt-delor
    Jan 19 at 13:12

















What Operating System+

– ctrl-alt-delor
Jan 19 at 13:12





What Operating System+

– ctrl-alt-delor
Jan 19 at 13:12










1 Answer
1






active

oldest

votes


















3














You should not put in /usr/lib: don't mix OS stuff with locally installed stuff.



You can put them in /usr/local/, this is a shadow of /. It has /usr/local/lib, /usr/local/bin, /usr/local/include etc. You should also look into stow it will help you manage your local packages (Keep them separate from each other. While putting them all together.)



Or you can keep them in your home directory: stow can, optionally, help here also.



It is up to you, if you install globally (/usr/local/) or in user directory. Both can be shared with others. But by putting in /usr/local, they are automatically shared. And you need admin (root or …) access to install.






share|improve this answer



















  • 1





    Even /usr/local may be out of bounds if you are on a system where the package manager installs software there (as on some BSDs). There's nothing stopping a local administrator from using /opt or some other top-level directory for locally managed software though.

    – Kusalananda
    Jan 19 at 13:08






  • 1





    @Kusalananda I did not know that package managers install to there (how rude of them, did they not learn from earlier error?: When /usr became a system directory.). I use /opt to install stuff that is designed to stay self contained: one dir per package.

    – ctrl-alt-delor
    Jan 19 at 13:11






  • 1





    Well, FreeBSD and OpenBSD does (NetBSD uses /usr/pkg). And it makes sense. Packages are not part of the base system, so they are classified as "local software" since it's a local administrator that installs them.

    – Kusalananda
    Jan 19 at 13:14













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f495443%2fis-it-conventional-to-put-libraries-and-include-into-standard-directories-like%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














You should not put in /usr/lib: don't mix OS stuff with locally installed stuff.



You can put them in /usr/local/, this is a shadow of /. It has /usr/local/lib, /usr/local/bin, /usr/local/include etc. You should also look into stow it will help you manage your local packages (Keep them separate from each other. While putting them all together.)



Or you can keep them in your home directory: stow can, optionally, help here also.



It is up to you, if you install globally (/usr/local/) or in user directory. Both can be shared with others. But by putting in /usr/local, they are automatically shared. And you need admin (root or …) access to install.






share|improve this answer



















  • 1





    Even /usr/local may be out of bounds if you are on a system where the package manager installs software there (as on some BSDs). There's nothing stopping a local administrator from using /opt or some other top-level directory for locally managed software though.

    – Kusalananda
    Jan 19 at 13:08






  • 1





    @Kusalananda I did not know that package managers install to there (how rude of them, did they not learn from earlier error?: When /usr became a system directory.). I use /opt to install stuff that is designed to stay self contained: one dir per package.

    – ctrl-alt-delor
    Jan 19 at 13:11






  • 1





    Well, FreeBSD and OpenBSD does (NetBSD uses /usr/pkg). And it makes sense. Packages are not part of the base system, so they are classified as "local software" since it's a local administrator that installs them.

    – Kusalananda
    Jan 19 at 13:14


















3














You should not put in /usr/lib: don't mix OS stuff with locally installed stuff.



You can put them in /usr/local/, this is a shadow of /. It has /usr/local/lib, /usr/local/bin, /usr/local/include etc. You should also look into stow it will help you manage your local packages (Keep them separate from each other. While putting them all together.)



Or you can keep them in your home directory: stow can, optionally, help here also.



It is up to you, if you install globally (/usr/local/) or in user directory. Both can be shared with others. But by putting in /usr/local, they are automatically shared. And you need admin (root or …) access to install.






share|improve this answer



















  • 1





    Even /usr/local may be out of bounds if you are on a system where the package manager installs software there (as on some BSDs). There's nothing stopping a local administrator from using /opt or some other top-level directory for locally managed software though.

    – Kusalananda
    Jan 19 at 13:08






  • 1





    @Kusalananda I did not know that package managers install to there (how rude of them, did they not learn from earlier error?: When /usr became a system directory.). I use /opt to install stuff that is designed to stay self contained: one dir per package.

    – ctrl-alt-delor
    Jan 19 at 13:11






  • 1





    Well, FreeBSD and OpenBSD does (NetBSD uses /usr/pkg). And it makes sense. Packages are not part of the base system, so they are classified as "local software" since it's a local administrator that installs them.

    – Kusalananda
    Jan 19 at 13:14
















3












3








3







You should not put in /usr/lib: don't mix OS stuff with locally installed stuff.



You can put them in /usr/local/, this is a shadow of /. It has /usr/local/lib, /usr/local/bin, /usr/local/include etc. You should also look into stow it will help you manage your local packages (Keep them separate from each other. While putting them all together.)



Or you can keep them in your home directory: stow can, optionally, help here also.



It is up to you, if you install globally (/usr/local/) or in user directory. Both can be shared with others. But by putting in /usr/local, they are automatically shared. And you need admin (root or …) access to install.






share|improve this answer













You should not put in /usr/lib: don't mix OS stuff with locally installed stuff.



You can put them in /usr/local/, this is a shadow of /. It has /usr/local/lib, /usr/local/bin, /usr/local/include etc. You should also look into stow it will help you manage your local packages (Keep them separate from each other. While putting them all together.)



Or you can keep them in your home directory: stow can, optionally, help here also.



It is up to you, if you install globally (/usr/local/) or in user directory. Both can be shared with others. But by putting in /usr/local, they are automatically shared. And you need admin (root or …) access to install.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 19 at 13:04









ctrl-alt-delorctrl-alt-delor

11.8k42260




11.8k42260








  • 1





    Even /usr/local may be out of bounds if you are on a system where the package manager installs software there (as on some BSDs). There's nothing stopping a local administrator from using /opt or some other top-level directory for locally managed software though.

    – Kusalananda
    Jan 19 at 13:08






  • 1





    @Kusalananda I did not know that package managers install to there (how rude of them, did they not learn from earlier error?: When /usr became a system directory.). I use /opt to install stuff that is designed to stay self contained: one dir per package.

    – ctrl-alt-delor
    Jan 19 at 13:11






  • 1





    Well, FreeBSD and OpenBSD does (NetBSD uses /usr/pkg). And it makes sense. Packages are not part of the base system, so they are classified as "local software" since it's a local administrator that installs them.

    – Kusalananda
    Jan 19 at 13:14
















  • 1





    Even /usr/local may be out of bounds if you are on a system where the package manager installs software there (as on some BSDs). There's nothing stopping a local administrator from using /opt or some other top-level directory for locally managed software though.

    – Kusalananda
    Jan 19 at 13:08






  • 1





    @Kusalananda I did not know that package managers install to there (how rude of them, did they not learn from earlier error?: When /usr became a system directory.). I use /opt to install stuff that is designed to stay self contained: one dir per package.

    – ctrl-alt-delor
    Jan 19 at 13:11






  • 1





    Well, FreeBSD and OpenBSD does (NetBSD uses /usr/pkg). And it makes sense. Packages are not part of the base system, so they are classified as "local software" since it's a local administrator that installs them.

    – Kusalananda
    Jan 19 at 13:14










1




1





Even /usr/local may be out of bounds if you are on a system where the package manager installs software there (as on some BSDs). There's nothing stopping a local administrator from using /opt or some other top-level directory for locally managed software though.

– Kusalananda
Jan 19 at 13:08





Even /usr/local may be out of bounds if you are on a system where the package manager installs software there (as on some BSDs). There's nothing stopping a local administrator from using /opt or some other top-level directory for locally managed software though.

– Kusalananda
Jan 19 at 13:08




1




1





@Kusalananda I did not know that package managers install to there (how rude of them, did they not learn from earlier error?: When /usr became a system directory.). I use /opt to install stuff that is designed to stay self contained: one dir per package.

– ctrl-alt-delor
Jan 19 at 13:11





@Kusalananda I did not know that package managers install to there (how rude of them, did they not learn from earlier error?: When /usr became a system directory.). I use /opt to install stuff that is designed to stay self contained: one dir per package.

– ctrl-alt-delor
Jan 19 at 13:11




1




1





Well, FreeBSD and OpenBSD does (NetBSD uses /usr/pkg). And it makes sense. Packages are not part of the base system, so they are classified as "local software" since it's a local administrator that installs them.

– Kusalananda
Jan 19 at 13:14







Well, FreeBSD and OpenBSD does (NetBSD uses /usr/pkg). And it makes sense. Packages are not part of the base system, so they are classified as "local software" since it's a local administrator that installs them.

– Kusalananda
Jan 19 at 13:14




















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f495443%2fis-it-conventional-to-put-libraries-and-include-into-standard-directories-like%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?