This error often happen when building opencv or caffe.
I found it is quite annoying as everytime I have to spend a lot of time to debug.
I think I understand the issue now.
First, check the protoc version you are using:-
$ protoc --version
libprotoc 2.6.1
$ dpkg -l | grep protobuf
Second, check which protoc you are using, remove those not from /usr/bin/:- $ which protoc
/home/user/.conda/envs/caffe2/bin/protoc
$ conda uninstall libprotobuf
Third, remove and install again the protoc and protobuf:-
$ sudo add-apt-repository ppa:maarten-fonville/protobuf
$ sudo apt-get update
$ sudo apt-get remove libprotobuf-dev libprotoc-dev protobuf-compiler
$ sudo apt-get install libprotobuf-dev libprotoc-dev protobuf-compiler
Finally rerun the make for opencv and caffe.
One thing to take note for opencv as there are some conflict when enabling the dnn module.
If there is an error of protobuf when building opencv, try add on the following to cmake:-
-DBUILD_PROTOBUF=OFF
-DPROTOBUF_UPDATE_FILES=ON
-DBUILD_OPENCV_DNN=OFF
platform: ubuntu16.04, python2.7, anaconda3
No comments:
Post a Comment