Ubuntu中libprotobuf版本冲突的解决方案
先说解决方法:
因为我出现这个比较奇特,我再下面环境中的第一个项目有这个问题,但是不知道怎么瞎折腾就搞定了,不报这个异常了
不论是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
.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
2015-11-19 【转载】COM 组件设计与应用(三)——数据类型