我自己安装的protoc是3.5.1 ,这个和caffe自己要求的有冲突,所以就报错。尽量用下面这个方法安装protoc
sudo apt-get install libprotobuf-dev protobuf-compiler
卸载:
#remove
sudo apt-get remove libprotobuf-dev protobuf-compiler
sudo apt-get remove libprotobuf-lite8 libprotoc8
sudo apt-get remove python-protobuf
sudo pip uninstall protobuf
#如果安装了anaconda
conda uninstall protobuf