Reputation: 1
System: Ubuntu 16.04
I installed protobuf, with next steps:
sudo apt-get install autoconf automake libtool curl make g++ unzip
wget https://github.com/google/protobuf/releases/download/v3.2.0/protobuf-cpp-3.2.0.tar.gz
tar -xvf protobuf-cpp-3.2.0.tar.gz
cd protobuf-3.2.0
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig
but when I try to compile my program. I am getting the following error
/home/arslan/www/src/main/build-controlpanel-Desktop_Qt_5_8_0_GCC_64bit-Debug/controlpanel
[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.2.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.2.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".)
The program has unexpectedly finished.
also I have in /usr/lib/x86_64-linux-gnu
folder, following files:
./libprotobuf-lite.so.9.0.1
./libprotobuf.so.9.0.1
./libprotobuf.so.9
./libprotobuf-lite.so.9
If I remove them, program will execute properly, however Ubuntu will stuck on boot
/dev/sda4: clean, xxxxxxx/xxxxxxx files, xxxxxx/xxxxxx blocks
How to solve this problem?
Upvotes: 0
Views: 2451
Reputation: 21
qt5.9 has something related with protobuf 2.6.1;
I just solved this by linking with protobuf static lib rather than shared lib
in project.pro
replace
LIB += -lprotobuf
with
LIBS += /usr/local/lib/libprotobuf.a
Upvotes: 2
Reputation: 4390
It looks like your mixing the protobuf you've compiled, with the OS's protobuf. Try forcing the path of all protoc
and libprotobuf
. Or, if you can, uninstall protobuf from your Ubuntu.
Upvotes: 0