protbuf版本问题

错误提示

I0307 11:46:13.909721 30298 layer_factory.hpp:77] Creating layer data
[libprotobuf FATAL google/protobuf/stubs/common.cc:67] This program requires version 3.6.0 of the Protocol Buffer runtime library, but the installed version is 3.0.0. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in “google/protobuf/descriptor.pb.cc”.)
terminate called after throwing an instance of ‘google::protobuf::FatalException’
what(): This program requires version 3.6.0 of the Protocol Buffer runtime library, but the installed version is 3.0.0. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in “google/protobuf/descriptor.pb.cc”.)
*** Aborted at 1551930374 (unix time) try “date -d @1551930374” if you are using GNU date ***

问题分析

系统环境
1.使用的系统是ubuntu18.04
2.在安装caffe时,利用命令sudo apt-get install libprotobuf-dev protobuf-compiler安装了protobuf,安装的版本是3.0.0;
3.python版本3.6
问题的出现
在使用caffe里的python layer时出现上述问题;
分析
python里的protobuf是3.6版本的,解决方法,更新protobuf的版本;
解决步骤:
1.sudo apt-get remove libprotobuf-dev protobuf-compiler
2.sudo apt-get autoremove --purge
3.下载protbuf3.6版本进行编译安装
4.重新编译安装caffe

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页