0

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)
Farid Alijani
  • 839
  • 1
  • 7
  • 25

2 Answers2

1

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)

tomgalpin
  • 1,943
  • 1
  • 4
  • 12
0

While tomgalpin's answer seems completely right, I just provide the commands summary:

Download the latest boost package from here or simply get it in terminal:

$ wget https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz

Following this link:

$ cd path/to/boost_1_72_0 # or your own version
$ ./bootstrap.sh --prefix=path/to/custom_folder
$ /b2 install --prefix=path/to/custom_folder

When done, $ cd path/to/custom_folder and $ ls will show you include and lib folders created in custom_folder

Farid Alijani
  • 839
  • 1
  • 7
  • 25