编译caffe前先安装库:
sudo apt-get install git
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev
libopencv-dev libhdf5-serial-dev rotobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install python-dev
sudo apt-get insall libgflags-dev libgoogle-glog-dev liblmdb-dev
然后进入caffe目录,先make clean,再make all -j8开始编译。