Caffe编译报错

Caffe编译报错

博主在修改了电脑环境后重新编译之前项目的Caffe,出现了几个小错误,在此记录下来。注意,在每次修改后都需要运行 make clean'再重新make。更新于2018.10.22。

1

make: *** No rule to make target '/usr/include/google/protobuf/stubs/common.h', needed by '.build_release/cuda/src/caffe/solvers/adam_solver.o'。 停止。

由于protobuf的默认安装目录是/usr/local/,而caffe的搜索目录是/usr/,因此需要重新安装protobuf,将./configure改成./configure --prefix=/usr即可。

卸载

which protoc 
rm /usr/local/bin/protoc

安装

下载https://github.com/google/protobuf/releases ##Source code (zip)##
./autogen.sh
./configure --prefix=/usr
make
make check
sudo make install

2

caffe/proto/caffe.pb.h: 没有那个文件或目录

可能是make太快的缘故,将make -j 8改成make -j 5。

3

#error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

修改Makefile中的COMMON_FLAGS选项,在最后加上-std=c++11或-std=gnu++11。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值