RHEL / Fedora / CentOS Installation

General dependencies

  1. sudo yum install protobuf-devel leveldb-devel snappy-devel opencv-devel boost-devel hdf5-devel

Remaining dependencies, recent OS

  1. sudo yum install gflags-devel glog-devel lmdb-devel

Remaining dependencies, if not found

  1. # glog
  2. wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/google-glog/glog-0.3.3.tar.gz
  3. tar zxvf glog-0.3.3.tar.gz
  4. cd glog-0.3.3
  5. ./configure
  6. make && make install
  7. # gflags
  8. wget https://github.com/schuhschuh/gflags/archive/master.zip
  9. unzip master.zip
  10. cd gflags-master
  11. mkdir build && cd build
  12. export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
  13. make && make install
  14. # lmdb
  15. git clone https://github.com/LMDB/lmdb
  16. cd lmdb/libraries/liblmdb
  17. make && make install

Note that glog does not compile with the most recent gflags version (2.1), so before that is resolved you will need to build with glog first.

CUDA: Install via the NVIDIA package instead of yum to be certain of the library and driver versions.Install the library and latest driver separately; the driver bundled with the library is usually out-of-date. + CentOS/RHEL/Fedora:

BLAS: install ATLAS by sudo yum install atlas-devel or install OpenBLAS or MKL for better CPU performance. For the Makefile build, uncomment and set BLAS_LIB accordingly as ATLAS is usually installed under /usr/lib[64]/atlas).

Python (optional): if you use the default Python you will need to sudo yum install the python-devel package to have the Python headers for building the pycaffe wrapper.

Continue with compilation.