Tag Archives: computer science

Installing Caffe on Linux

First download caffe from github:

$> git clone https://github.com/BVLC/caffe.git
$> cd caffe
$> cp Makefile.config.example Makefile.config

Edit Makefile.config
Make a copy of Makefile.config
Make the following changes to Makefile.config:
Uncomment: CPU_ONLY := 1
Uncomment the right PYTHON_INCLUDE path. If you have anaconda installed, uncomment the anaconda path for PYTHON_INCLUDE and PYTHON_LIB

make clean
make all
make test
make runtest

You might encounter the following error during make runtest:
Error loading shared library libhdf5_hl.so.xx
In such a case, look for libhdf5_hl.so.xx in /usr/lib/x86_64-linux-gnu. If you do not find the correct version .xx and instead .yy, just copy .yy to .xx in the same folder. And it should run. For example, you might have the .7 version but your current caffe installation is looking for .8 version such as the listing shown below:
This is what exists:

Copy above files to the following:

And you are good to go :)