Should boost be installed in /usr/ or /usr/local/ for bitcoin-core?

3

When installing bitcoin-core, libbitcoin or libbitcoin-explorer the build requires the C++ boost library. Is there any reason why I should prefer to install boost in the /usr/ hierarchy rather than /usr/local. Or should I not attempt to link all my C++ projects to the same boost build anyway, and link to a seperate boost build (of a possibly different versions installed in different locations) for each project?

Sven Williamson

Posted 2016-10-28T22:15:17.107

Reputation: 1 314

Answers

2

Libraries should be installed in /usr/include.

For Boost, the path to it should be /usr/include/boost. That's where the linker would be looking for the libraries.

Otherwise, you may elect to install the libraries in some different directory and symlink it to /usr/include anyways.

renlord

Posted 2016-10-28T22:15:17.107

Reputation: 2 167

Thank you! it seems however that not everyone agrees (e.g. https://ubuntuforums.org/showthread.php?t=1528661). I now have the impression that unless your boost library is coming from a distribution package, it is advised to stick it in /usr/local/include/boost and /usr/local/lib rather than in the /usr/ hierarchy. I'll wait a bit before accepting this answer as the definite truth :)

Sven Williamson 2016-10-29T15:15:43.247

This seems like something more suitable at unix stack exchange if we really wanna discuss where is best to install any arbitrary Libs.renlord 2016-10-29T15:58:10.297