This program requires version 3.3.0 of the Protocol Buffer runtime library

此问题处理主要参考This program requires version 3.3.0 of the Protocol Buffer runtime library

问题描述

在安装好caffe之后,想要运行自己的数据集,因此使用了Python写了数据的输入层,但是当运行的时候确报错:

I1014 12:10:10.685569 11452 layer_factory.hpp:77] Creating layer Data
[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.4.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1.  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.4.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1.  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 1507954211 (unix time) try "date -d @1507954211" if you are using GNU date ***
PC: @     0x7ff1a8036428 gsignal
*** SIGABRT (@0x3e800002cbc) received by PID 11452 (TID 0x7ff1aa1f0ac0) from PID 11452; stack trace: ***@     0x7ff1a80364b0 (unknown)@     0x7ff1a8036428 gsignal@     0x7ff1a803802a abort@     0x7ff1a8e4a84d __gnu_cxx::__verbose_terminate_handler()@     0x7ff1a8e486b6 (unknown)@     0x7ff1a8e48701 std::terminate()@     0x7ff1a8e48919 __cxa_throw@     0x7ff1a938e647 google::protobuf::internal::LogMessage::Finish()@     0x7ff1a938e87d google::protobuf::internal::VerifyVersion()@     0x7ff16f8b0754 google::protobuf::protobuf_google_2fprotobuf_2fdescriptor_2eproto::TableStruct::InitDefaultsImpl()@     0x7ff1a938ef75 google::protobuf::GoogleOnceInitImpl()@     0x7ff16f8abae5 google::protobuf::protobuf_google_2fprotobuf_2fdescriptor_2eproto::InitDefaults()@     0x7ff16f8abb19 google::protobuf::protobuf_google_2fprotobuf_2fdescriptor_2eproto::(anonymous namespace)::AddDescriptorsImpl()@     0x7ff1a938ef75 google::protobuf::GoogleOnceInitImpl()@     0x7ff16f8abb95 google::protobuf::protobuf_google_2fprotobuf_2fdescriptor_2eproto::AddDescriptors()@     0x7ff1aa0636ba (unknown)@     0x7ff1aa0637cb (unknown)@     0x7ff1aa0688e2 (unknown)@     0x7ff1aa063564 (unknown)@     0x7ff1aa067da9 (unknown)@     0x7ff1a5a30f09 (unknown)@     0x7ff1aa063564 (unknown)@     0x7ff1a5a31571 (unknown)@     0x7ff1a5a30fa1 dlopen@     0x7ff1a86be88d _PyImport_GetDynLoadFunc@     0x7ff1a872d4be _PyImport_LoadDynamicModule@     0x7ff1a872e300 (unknown)@     0x7ff1a872e5c8 (unknown)@     0x7ff1a872f6db PyImport_ImportModuleLevel@     0x7ff1a86a6698 (unknown)@     0x7ff1a86f21e3 PyObject_Call@     0x7ff1a87c8447 PyEval_CallObjectWithKeywords
Aborted (core dumped)

通过问题的前几行发现问题主要出在Protocol Buffer上,说是版本太低,升级库的版本可以解决。千万不要升级,只会在这上面浪费时间,具体可参考网址。

问题原因

主要是因为caffe编译的时候默认的protobuf的版本是2.6.1,而Python通过pip install protobuf 安装的版本是最新版本3.4.0!

而在caffe环境中我们必须统一ProtoBuffer的版本才可以避免各种不易排查的错误!!
为此,我们先卸载Python的版本ProtoBuffer,再重新安装2.6.1的版本就完美的解决了这个问题。
操作:

pip uninstall protobuf

E470:~/caffe$ pip uninstall protobuf
Uninstalling protobuf-3.4.0:/usr/local/lib/python2.7/dist-packages/google/protobuf/__init__.py/usr/local/lib/python2.7/dist-packages/google/protobuf/__init__.pyc.......Proceed (y/n)? ySuccessfully uninstalled protobuf-3.4.0

然后再重新安装:

pip install protobuf==2.6.1

解决!

PS:
ProtoBuffer 是由Google开发的一种可以实现内存与非易失存储介质(如硬盘文件)交换的协议接口。
具体知识可参考《深度学习21天实战Caffe》

This program requires version 3.4.0 of the Protocol Buffer runtime library相关推荐

  1. [Nova ERROR] InternalError: Nova requires QEMU version 2.5.0 or greater.

    目录 文章目录 目录 问题 调查 解决 问题 nova-compute service 启动失败 InternalError: Nova requires QEMU version 2.5.0 or ...

  2. 关于jd-gui启动报This program requires Java 1.8+的错误

    最近,在Mac使用上JD-GUI启动时,报了如下的错误: ERROR launching 'JD-GUI'No suitable Java version found on your system! ...

  3. Mac使用jd-gui启动报错 This program requires Java 1.8+

    Mac使用JD-GUI启动报错问题: 报错内容: ERROR launching 'JD-GUI'No suitable Java version found on your system! This ...

  4. 未能加载文件或程序集“System.Net.Http, Version=4.2.0.0,。。。”或它的某一个依赖项

    无语了,这笃NET. 页面运行过程中,出现了一个错误: 未能加载文件或程序集"System.Net.Http, Version=4.0.0.0, Culture=neutral, Publi ...

  5. @angular/compiler-cli@4.3.6 requires typescript@'=2.1.0 2.4.0' but 2.5.2 was found instead.

    新手编程得我,angular2框架上应用ngx-bootstrap.ngx-datatable.ngx-charts这两天问题比较多啊. @angular/compiler-cli@4.3.6 req ...

  6. 【错误记录】Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. ② | 升级 Gradle 版本 )

    文章目录 一.报错信息 二.解决方案 解决 Could not determine java version from '11.0.8'. 问题 , 有两种方案 , 方案一 : Android Stu ...

  7. 【错误记录】Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | Android Studio 降级 )

    文章目录 一.报错信息 二.解决方案 一.报错信息 编译 VirtualApp 报如下错误 : Could not determine java version from '11.0.8'.The p ...

  8. 【错误记录】Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | 仅做参考 | 没有解决实际问题 )

    文章目录 一.报错信息 二.解决方案 一.报错信息 编译 VirtualApp 报如下错误 : Could not determine java version from '11.0.8'.The p ...

  9. Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0

    前些天发现这个问题的,本来原有的项目是用VS2005开发的,后来装了VS2008,没想到问题就来了. 原项目是ASP.NET 2.0,用到了Ajax Extension,.NET 2.0用的Ajax ...

  10. 成功解决torch.cuda.CudaError: CUDA driver version is insufficient for CUDA runtime version (35) [ WARN:0

    成功解决torch.cuda.CudaError: CUDA driver version is insufficient for CUDA runtime version (35) [ WARN:0 ...

最新文章

  1. java 多线程 信号_Java多线程——Semaphore信号灯
  2. python如何开发小软件-Python程序员,如何快速开发一个小程序
  3. 剑指offer---11---二进制中1的个数
  4. js中的SetTimeOut
  5. 1.1 MySQL 逻辑架构
  6. linux下oracle自启动
  7. 干货 | 算法工程师入门第二期——穆黎森讲增强学习(二)
  8. Cookie application session
  9. centos修改磁盘uuid_为什么MySQL用uuid做主键会被骂?
  10. MDT服务器部署系统,使用MDT2013部署Win8系统之三-配置MDT服务器之导入操作系统...
  11. NIO 网络编程之群聊系统
  12. 吃货在东京 -- 记那段吃不饱的日子 之二 丰州的雪花牛肉
  13. 树莓派 Pico Pi USB串口通信
  14. java graphics类详解_Java中Graphics2D类的使用操作解析
  15. leet160:相交链表
  16. 13:求圆的周长和面积
  17. 数字式高精度可调电流源电路设计
  18. PLP: 4.2/4.3 Attribute Gramma阅读笔记3
  19. 哪些情况下你的虾皮店铺会被封店
  20. 读后感《孤独的张小龙,在商业中走出孤独》

热门文章

  1. U811.1接口EAI系列之三--采购订单生成--VB语言
  2. MySQL常见问题及解决方案
  3. SpringBoot学习之logback.xml 配置指定包或类输出至单独的日志文件中
  4. java+phantomjs实现动态网页抓取
  5. sql2012,返回数据多时不走索引
  6. 从零开始搭建框架SSM+Redis+Mysql(一)之摘要
  7. Centos之常见目录作用介绍
  8. Python自动化课之Day3篇
  9. python中类方法、类实例方法、静态方法的使用与区别
  10. INFORMIX体系效能改善第一步