qt配置tensorflow 动态链接库运行错误

使用qt配置自己编译的tensorflow,在.pro文件下添加如下配置:

INCLUDEPATH += /usr/local/opencv3/include /usr/local/include /home/zy/.cache/bazel/_bazel_zy/69673882bdf22f44b89ee446a9525e4a/external/eigen_archive/Eigen \ #Eigen library;
/home/zy/.cache/bazel/_bazel_zy/69673882bdf22f44b89ee446a9525e4a/external/eigen_archive /home/zy/.cache/bazel/_bazel_zy/69673882bdf22f44b89ee446a9525e4a/external/nsync/public /home/zy/Downloads/tensorflow-1.4.0/bazel-tensorflow-1.4.0 /home/zy/Downloads/tensorflow-1.4.0/bazel-genfiles

LIBS += -L/home/zy/Downloads/tensorflow-1.4.0/bazel-bin/tensorflow -L/usr/local/opencv3/lib/ -L/usr/local/lib /usr/local/lib/libprotobuf.a /home/zy/Downloads/tensorflow-1.4.0/bazel-bin/tensorflow/libtensorflow_cc.so /home/zy/Downloads/tensorflow-1.4.0/bazel-bin/tensorflow/libtensorflow_framework.so /usr/local/opencv3/lib/libopencv_core.so /usr/local/opencv3/lib/libopencv_highgui.so /usr/local/opencv3/lib/libopencv_imgproc.so /usr/local/opencv3/lib/libopencv_imgcodecs.so

运行包含tensorflow头文件的程序,出现如下错误:

[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.4.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.4.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".)

问题分析

系统的protoc位置在/usr/local/bin, 使用protoc --version输出的版本号为:libprotoc 3.4.0.

时间: 2024-08-30 01:19:52

qt配置tensorflow 动态链接库运行错误的相关文章

Ubuntu下QT控制台程序无法运行的解决方案以及XTerm的配置方法

Ubuntu下QT控制台程序无法运行的解决方案以及XTerm的配置方法 最近由于老师要求要在Ubuntu下QT上进程多线程服务器的开发,虽然只是单纯的调用qt的network模块,但是为了避免麻烦,我还是很操蛋的在QT下写控制台程序了,但是写完程序后运行时出现了如下情况. 程序运行了,但是控制台中居然只有一个光标在那儿跳啊跳.由于百度的姿势不对,废了好多时间,终于明白是因为qt creator不支持Gnome默认的终端gnome-terminal. 所以要换成XTerm的控制台. 具体的解决方式

macOS10.13.2配置TensorFlow

安装Python python3是通过Homebrew安装的,默认安装的是3.7.0版本,但TensorFlow目前只能在3.4,3.5,3.6上安装,因此首先需要安装3.6版本的python. 首先运行命令 brew unlink python3 然后通过https://github.com/Homebrew/homebrew-core/commits/master/Formula/python.rb 找到要需要安装的python版本,我这里选择python:3.6.5_1 bottle,再用

配置sql的常见错误问题

错误1:wizard安装最后一页,出现cannot create Windows service for mysql.error:0 错误 解决方法:打开命令行 输入 sc delete mysql 命令即   C:>sc delete mysql   [SC] DeleteService SUCCESS重起电脑,或者卸载后重启再安装,这样就好了.我是卸载后重启的. 卸载重新安装要注意一个问题,在控制面板中卸载后,要去c:\Documents and Settings\All Users\App

yaf运行错误:Class 'Yaf_Application' not found

提示:致命错误 Yaf_Application 基类没有加载进去 一检查:phpinfo() 里yaf 扩展有没有安装上 扩展也安装进去了 这时在分布式配置文件的重写 也是正确 这时百思不得其解,没办法找人google不到,因为第一次接触这种扩展式框架,也没有找到解决方案 最后把我项目拷贝他的环境中 运行正常 最后检查这一项配置 发现我当初安装时 把yaf.use_namespace (命名空间) 打开了 果断在php.ini (当初在php.ini中开启的)关闭命名空间 因为new那个类的时候

配置系统未能初始化 错误的解决方案

今天修改了App.config,结果运行的时候出现了 "配置系统未能初始化" 的错误.找了半天才发现是下面的原因造成的: MSDN里写到"如果配置文件中包含 configSections 元素,则 configSections 元素必须是 configuration 元素的第一个子元素.". 配置系统未能初始化 错误的解决方案,布布扣,bubuko.com

关于一些由于apache配置不而导致的错误和其它

1.如果你想将www放在apache默认的配置下,那么将它放在别的文件的时候,一定要放在其它盘符的根目录下,否则可以会应该其它莫名的报错(当然,也要修改配置文件): 2.再给网站做了重定向之后(配置httpd_vhosts.conf文件和host文件文件后),一定还在加载httpd_vhosts.conf文件,具体做法是:将httpd.conf文件的466行代码前面的#去掉: 如果加载了httpd_vhosts.conf文件,当你地址栏中输入重定向的网址后,你的网站根路径将直接指向你的网站的根目

让你提前认识软件开发(51):VC++集成开发环境中Linux下Pclint工程的配置方法及常见错误修改

第3部分 软件研发工作总结 VC++集成开发环境中Linux下Pclint工程的配置方法及常见错误修改 [文章摘要] Pclint是一种C/C++软件代码静态分析工具.它是一种更加严格的编译器,能够发现普通编译器所不能发现的代码中的很多问题,因此被广泛应用于软件开发项目中. 本文介绍了如何在VC++集成开发环境中配置Linux下的Pclint工程,给出了C语言中pclint规则A检查的常见错误,并描述了对应的修改办法. [关键词] VC++  Pclint  配置  操作  修改 1. 前言 P

vs与qt配置

1.error: these Qt version are inaccessible;Qt5.4.0 in D:\qt5.4.0\5.4\msvc2013Make sure that you have read access to all files in your Qt directories. solution : 1>在Visual Studio,去Qt5 > Qt选项 2>单击Add 3>在版本名称:输入您的版本 4>在路径:选择的路径Qt目录中的文件夹命名msvcx

将mcomaster配置以apache运行

前一篇文章介绍了mcomaster的部署,完成后默认是以webrick http方式运行,监听3000端口,这个跟之前说的puppet-dashboard部署时一样,应该说rails程序默认都以这种方式运行. webrick本身效率并不好,另外我们很多时候不希望服务器开多余的端口,本文就介绍如何以apache的方式运行rails程序. 一.安装passenger 需要为apache安装passenger模块,可以采用yum安装,这里使用gem安装 # gem install passenger