Makefile:589: recipe for target '.build_release/src/caffe/proto/caffe.pb.o' failed

网友投稿 1207 2022-08-23

Makefile:589: recipe for target '.build_release/src/caffe/proto/caffe.pb.o' failed

Makefile:589: recipe for target '.build_release/src/caffe/proto/caffe.pb.o' failed

今天在装caffe的时候,编译的时候遇到了一点问题,错误信息如下:

.build_release/src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^.build_release/src/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^.build_release/src/caffe/proto/caffe.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc. ^Makefile:582: recipe for target '.build_release/src/caffe/syncedmem.o' failedmake: *** [.build_release/src/caffe/syncedmem.o] Error 1make: *** Waiting for unfinished jobs....In file included from ./include/caffe/util/cudnn.hpp:8:0, from ./include/caffe/util/device_alternate.hpp:40, from ./include/caffe/common.hpp:19, from ./include/caffe/blob.hpp:8, from src/caffe/layers/rnn_layer.cpp:4:.build_release/src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^.build_release/src/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^.build_release/src/caffe/proto/caffe.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc. ^Makefile:582: recipe for target '.build_release/src/caffe/layers/rnn_layer.o' failedmake: *** [.build_release/src/caffe/layers/rnn_layer.o] Error 1In file included from ./include/caffe/util/cudnn.hpp:8:0, from ./include/caffe/util/device_alternate.hpp:40, from ./include/caffe/common.hpp:19, from ./include/caffe/blob.hpp:8, from ./include/caffe/layers/exp_layer.hpp:6, from src/caffe/layers/exp_layer.cpp:3:.build_release/src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^.build_release/src/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^.build_release/src/caffe/proto/caffe.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc. ^Makefile:582: recipe for target '.build_release/src/caffe/layers/exp_layer.o' failedmake: *** [.build_release/src/caffe/layers/exp_layer.o] Error 1In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:0:.build_release/src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^.build_release/src/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^.build_release/src/caffe/proto/caffe.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc. ^Makefile:589: recipe for target '.build_release/src/caffe/proto/caffe.pb.o' failedmake: *** [.build_release/src/caffe/proto/caffe.pb.o] Error 1

我输入的命令为,在caffe目录下:

make all -j8

好像是protobuf出现了问题,于是我自己编译了一个:

​​apt-get install autoconf automake libtoolsudo apt-get install libffi-devsudo apt-get install curl

然后我-的是3.1版本,然后解压,运行:

tar -xvf protobuf-3.1.0.tar.gz./autogen.sh ./configure --prefix=/usr/local/protobufmakemake checksudo make install

然后加环境变量,vim /etc/profile:

export PATH=$PATH:/usr/local/protobuf/binexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/protobuf/lib

生效:

source /etc/profile

然后就行了。

参考文献

[1].caffe build problem.https://github.com/BVLC/caffe/issues/3671

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:src/caffe/layers/hdf5_data_layer.cpp:13:18: fatal error: hdf5.h: No such file or directory
下一篇:Android中的缓存
相关文章

 发表评论

暂时没有评论,来抢沙发吧~