[libprotobuf FATAL external/protobuf_archive/src/google/protobuf/stubs/common.cc:79]

9 篇文章 1 订阅
8 篇文章 0 订阅

[libprotobuf FATAL external/protobuf_archive/src/google/protobuf/stubs/common.cc:79] This program was compiled against version 2.6.1 of the Protocal Buffer runtime library, which is not compatible with the installed version(3.6.0). Contact the program author for an update. If you compiled the program yourself, make sure that your headers are from the same version of Protocal Buffers as your link-time library. (Version verification failed in "/build/mir-08_xaj/mir-0.26.3+16.044.20170605/obj-x86_64-linux-gnu/src/protobuf/mir_protobuf.pb.cc".)terminate called after throwing an instance of 'google::protobuf::FatalException' what(): This program was compiled against version 2.6.1 of the Protocal Buffer runtime library, which is not compatible with the installed version (3.6.0). Contact the program author for an update. If you compiled the program yourself, make sure that your headers are from the same version of the Protocal Buffers as your link-time library. (Version verification failed in "/build/mir-08_xaj/mir-0.26.3+16.04.20170605/obj-x86_64-linux-gun/src/protobuf/mir_protobuf.pb.cc".)

在使用C++编译的Tensorflow和Opencv4.0.0的时候,出现以上错误,属于protobuf的版本冲突问题。

主要问题就是,编译安装的Tensorflow中的protobuf是3.6的,其中的libprotobuf.so.17,在Opencv中使用的是protobuf2.6.1

的/usr/lib/x86_64-linux-gnu/ 中出现的是libprotobuf.so.9。

在编译安转Opencv的时候,使用的GTK3,而GTK3依赖于protobuf2.6.1,而GTK2不会这样。

所以在编译opencv的时候,将GTK选项去掉,使用GTK_2_X。

重新编译安装,解决问题。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值