首页 > 系统服务 > 详细

Ubuntu中libprotobuf版本冲突的解决方案

时间:2018-11-19 16:49:44      阅读:766      评论:0      收藏:0      [点我收藏+]

先说解决方法:

因为我出现这个比较奇特,我再下面环境中的第一个项目有这个问题,但是不知道怎么瞎折腾就搞定了,不报这个异常了

不论是Qt Creator直接运行Debug或者Release都没问题

但是我后续建立的项目始终有这个问题,经过几天的折腾发现新项目如果使用sudo命令启动程序就不会报异常,所以目前我的Qt Creator也用sudo命令启动。

下面的方法我都没有尝试过,但是应该最贴近根本原因的。

至于为什么同一个Qt Creator创建并打开的第一个项目正常,但是后续的就异常,目前还不清楚,后续调查清楚了再来更新。

 

先介绍一下环境:

Ubuntu 16.04

Qt 5.10

Caffe封装的人脸检测库

错误原因:

Caffe中用到的libprotobuf版本与Qt中引用的版本冲突

具体异常如下:

技术分享图片

Debugging starts

[libprotobuf FATAL google/protobuf/stubs/common.cc:78] This program was compiled against version 2.6.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.3.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 Protocol Buffers as your link-time library.  (Version verification failed in "/build/mir-O8_xaj/mir-0.26.3+16.04.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 Protocol Buffer runtime library, which is not compatible with the installed version (3.3.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 Protocol Buffers as your link-time library.  (Version verification failed in "/build/mir-O8_xaj/mir-0.26.3+16.04.20170605/obj-x86_64-linux-gnu/src/protobuf/mir_protobuf.pb.cc".)

 

程序异常堆栈如下:

技术分享图片

技术分享图片

 

网络上找到的靠谱资源:

c++ - Protobuf version conflicts with Qt - Stack Overflow  

技术分享图片

 

Qt for Linux/X11 - Building from Source | Qt 5.11  

 ParaView built with Qt 5.X linux release fails with protobuf error (#17751) · Issues · ParaView / ParaView · GitLab  

 

.

Ubuntu中libprotobuf版本冲突的解决方案

原文:https://www.cnblogs.com/zhehan54/p/9983794.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!