操作系統:Ubuntu 16.04衝突的Protobuf版本
我安裝protobuf的,與接下來的步驟:
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
但是當我嘗試編譯我的程序。我收到以下錯誤
/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.
我也有/usr/lib/x86_64-linux-gnu
文件夾,以下文件:
./libprotobuf-lite.so.9.0.1
./libprotobuf.so.9.0.1
./libprotobuf.so.9
./libprotobuf-lite.so.9
如果刪除它們,程序將正常執行,但是Ubuntu會停留在開機
/dev/sda4: clean, xxxxxxx/xxxxxxx files, xxxxxx/xxxxxx blocks
如何解決這個問題?
它不起作用 –