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

[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。

重新編譯安裝,解決問題。

發佈了63 篇原創文章 · 獲贊 71 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章