python2编译SSDcaffe,错误集

安装教程:https://blog.csdn.net/z_muyangren/article/details/80300923

错误1:Caffe.build_release/lib/libcaffe.so.1.0.0-rc3' failed

解决办法:

可能1. sudo apt-get install libopenblas-dev
可能2.

修改Makefile 文件(注意不是)Makefile.config
将里面的
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf

改为LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

 

错误2:build_release/src/caffe/proto/caffe.pb.h:23:35: fatal error: google/protobuf/arena.h: 没有那个文件

解决办法:https://blog.csdn.net/fight3ng/article/details/81335123

 

错误3:Build Caffe: #error This file was generated by an older version of protoc which is

caffe里面对应的protoc版本是2.6,但是conda 里面的版本是3.X所以会出错

解决办法:

conda uninstall libprotobuf
conda uninstall protobu

 

错误4:cuda9.0 编译caffe-gpu

nvcc fatal : Unsupported gpu architecture 'compute_20'

在Makefile.config 去掉下面两行:

  • -gencode arch=compute_20,code=sm_20 \  
  • -gencode arch=compute_20,code=sm_21 \ 

错误5:fatal error: opencv2/core/core.hpp: No such file or directory

解决办法:

sudo apt-get install libopencv-dev

错误6:

undefined reference to `google::protobuf::internal::StringTypeHandlerBase

解决办法:可能由于g++,gcc版本不对引起的,需要版本5.0之前都是4.8

sudo rm /usr/bin/gcc /usr/bin/g++

sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc

sudo ln -s /usr/bin/g++-5 /usr/bin/g++

搞定

你可能感兴趣的:(caffe)