Search code examples
boosterror-handlingbuildcaffe

"No such file or directory" error while installing boost on Red Hat OS


While installing caffe on SLURM cluster with Red Hat OS, I get the following error:

compilation terminated.
make: *** [.build_release/cuda/src/caffe/layers/clip_layer.o] Error 1
In file included from ./include/caffe/blob.hpp:8:0,
                 from ./include/caffe/layers/concat_layer.hpp:6,
                 from src/caffe/layers/concat_layer.cu:3:
./include/caffe/common.hpp:4:32: fatal error: boost/shared_ptr.hpp: No such file or directory
 #include <boost/shared_ptr.hpp>

It seems I do not have the boost installed on my account/machine as I checked /usr/include! (This is a university cluster and users do not have installation privilege).

My question is how to install boost on Red Hat OS considering such circumstances?

$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  440.64.00  Wed Feb 26 16:26:08 UTC 2020
GCC version:  gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)

Solution

  • Download the source of boost for the version you want. https://www.boost.org/users/download/

    Configure it using your home directory as the Prefix as described in Installing Boost libraries to a custom directory in ~ (home)