私は、ubuntu 16.04でtensorflow 1.4 & qtを使用しています。問題はテンソルフロー(バージョン:1.4)とopencv(バージョン:3.2.0)を同時に含めると、protobufが競合しているときです。次のようにエラーmsgがある:gtk3.xではなくgtk 2.xでopencvをコンパイルする方法
[libprotobuf FATAL external/protobuf_archive/src/google/protobuf/stubs/common.cc:79] This program was compiled against version 2.6.1 of the Protocol 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 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.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 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".)
は、私は上記の問題を引き起こし、そしてgtk-2.x
でOpenCVのをインストールすることはいるProtobufに依存しませんprotobuf 2.6.1
を使用しますgtk-3.x
とOpenCVのいくつかの場所から学びました。そしてopencv cmake msgの一部は以下の通りです.cmakeはgtk 3.x
を自動的に使います。
GUI: -- QT: NO -- GTK+ 3.x: YES (ver 3.18.9) -- GThread : YES (ver 2.48.2) -- GtkGlExt: NO -- OpenGL support: NO -- VTK support: NO
とシステムgtkの情報は次のとおりです。
$ pkg-config --modversion gtk+-2.0 $ 2.24.30
ここで私はcmake
を使用してgtk 2.x
とOpenCVのをインストールすることができproblem.Howはありますか?
CMakeLists.txtがGTKをどのように検出するかを示します。 SET(GTK_PATH/usr/lib/x86_64-linux-gnu /)のようなものがあれば、そのパスを変更することができます。 – ZuOverture