caffe安装常见问题

https://blog.csdn.net/u012576214/article/details/68947893

解决办法是依据出现错误的顺序而给出的,为了方便,可以直接先执行所有解决办法后再安装caffe。

1. ./include/caffe/common.hpp:5:27: fatal error: gflags/gflags.h: No such file or directory

解决办法:sudo apt-get install libgflags-dev

2. ./include/caffe/util/mkl_alternate.hpp:14:19: fatal error: cblas.h: No such file or directory

解决办法:sudo apt-get install libblas-dev

3. ./include/caffe/util/hdf5.hpp:6:18: fatal error: hdf5.h: No such file or directory

解决办法:在Makefile.config找到以下行并添加蓝色部分

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial 

LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial

4. ./include/caffe/util/db_lmdb.hpp:8:18: fatal error: lmdb.h: No such file or directory

解决办法:sudo apt install liblmdb-dev

5. /usr/bin/ld: cannot find -lcblas
    /usr/bin/ld: cannot find -latlas

解决办法:sudo apt install libatlas-base-dev


猜你喜欢

转载自blog.csdn.net/jyl1999xxxx/article/details/80608820
今日推荐