Installing Caffe on Linux

First download caffe from github:

$> git clone
$> 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
In such a case, look for 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 :)

Leave a Reply

Your email address will not be published.

ALL COMMENTS ARE MODERATED. PLEASE LEAVE YOUR COMMENT AND THE ADMINISTRATOR WILL REVIEW IT BEFORE POSTING. THANK YOU. You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>