当前位置 : 主页 > 大数据 > 区块链 >

使用Opencv和Tensorflow时冲突Protobuf版本c

来源:互联网 收集:自由互联 发布时间:2021-06-22
我目前正在尝试在非bazel项目中使用Tensorflow的共享库,因此我使用bazel从tensorflow创建一个.so文件. 但是当我启动一个同时使用Opencv和Tensorflow的c程序时,它会出现以下错误: [libprotobuf FATA
我目前正在尝试在非bazel项目中使用Tensorflow的共享库,因此我使用bazel从tensorflow创建一个.so文件.

但是当我启动一个同时使用Opencv和Tensorflow的c程序时,它会出现以下错误:

[libprotobuf FATAL external/protobuf/src/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.1.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-pkdHET/mir-0.21.0+16.04.20160330/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.1.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-pkdHET/mir-0.21.0+16.04.20160330/obj-x86_64-linux-gnu/src/protobuf/mir_protobuf.pb.cc”.)
Abandon (core dumped)

你能帮助我吗?

谢谢

该错误表明程序是使用protobuf 2.6.1中的头文件(.h文件)编译的.这些标题通常位于/usr/include / google / protobuf或/usr/local / include / google / protobuf中,但它们可能位于其他位置,具体取决于您的操作系统以及程序的构建方式.您需要将这些标头更新到3.1.0版并重新编译该程序.
网友评论