0. 环境
ubuntu 18.4 #其实此版本已经可以安装pre-compiled caffe:
sudo apt install caffe-cpu
但是由于这样没有pycaffe??
1. caffe github源码get
https://github.com/BVLC/caffe/
2. 编译
1. cd $CAFFEROOT
2. cp Makefile.config.example Makefile.config
3. #修改caffe设置 例如cpu-only=1等
修改makefile.config设置中的 CPU_ONLY := 1;
PYTHON_INCLUDE := /usr/include/python3.6 \
4. make all
#4. make all -jN 可以使得make更快
报错1:
./include/caffe/util/io.hpp:8:18: fatal error: hdf5.h: no such file or directory
解决办法:
报错2:
/usr/bin/x86_64-linux-gnu-ld: cannot find -lcblas