I am trying to install Caffe (which is required by another github project installation https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md) however when I begin to install cafe it gives me the error:
`In file included from /Users/sreeharirammohan/Desktop/openpose/build/caffe/src/openpose_caffe-build/include/caffe/proto/caffe.pb.cc:4:
/Users/sreeharirammohan/Desktop/openpose/build/caffe/src/openpose_caffe-build/include/caffe/proto/caffe.pb.h:17:2: error: This file was generated by an older version of protoc which is
^
/Users/sreeharirammohan/Desktop/openpose/build/caffe/src/openpose_caffe-build/include/caffe/proto/caffe.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
^
/Users/sreeharirammohan/Desktop/openpose/build/caffe/src/openpose_caffe-build/include/caffe/proto/caffe.pb.h:19:2: error: regenerate this file with a newer version of protoc.
`
download the anaconda libprotobuf and protobuf packages and attempt to build caffe using these instructions (https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md)
My conda version is 4.5.11
My libprotobuf version is 3.6.0
My protobuf version is 3.6.0
Here is what I think is happening based on this thread (https://github.com/BVLC/caffe/issues/5645#issuecomment-418208179) my anaconda versions of libprotobuf and protobuf are messing with the installation of caffe. A post in the above thread told me to simply uninstall them (but I can't because I have other projects on my laptop which require them). I need to somehow be able to create an environment without the conda versions of protobuf and libprotobuf for this project installation. I now a virtual environment would be perfect for this scenario but I have tried and failed to do it multiple times.
@SreehariRamMohan check if you have another protobuf installed in your system using the source! if yes then I share my solution.
I had the same problem, I came to know that there was a conflict between two versions of the protobuf installed via apt-get and from the source.
I checked via :
for apt-get:
export PATH=/usr/bin:$PATH
protoc --version
and for source:
export PATH=/usr/local/bin:$PATH
protoc --version
then removed the one installed through source,next I checked again and both were the same version.
after that I used make clean, and then make test, and voila! the problem solved for my case.
@itsmahbanoo Thanks for the tips!!!!!! I solved this issue a couple of weeks ago by linking the Caffe protobuf to the OpenPose protobuf using cmake. Thanks for the advice though! I'm sure it will help others facing a similar issue!!!
@itsmahbanoo
Thx. You saved me too!!!
Hi,
how to remove the one installed through source? I've libprotoc 3.0.0 from apt-get and libprotoc 3.4.0 from source.
Tnx
both were the same version.
after that I used make clean, and then make test, and voila! the problem solved for my case.
@ghost
currently, the above two (source/apt) are the same version on my machine, but i still got this error.. Do you know
Most helpful comment
@SreehariRamMohan check if you have another protobuf installed in your system using the source! if yes then I share my solution.
I had the same problem, I came to know that there was a conflict between two versions of the protobuf installed via apt-get and from the source.
I checked via :
for apt-get:
export PATH=/usr/bin:$PATH
protoc --version
and for source:
export PATH=/usr/local/bin:$PATH
protoc --version
then removed the one installed through source,next I checked again and both were the same version.
after that I used make clean, and then make test, and voila! the problem solved for my case.