1. 程式人生 > >ubuntu16.04下編譯caffe出現.build_release/lib/libcaffe.so: undefined reference to google ::protobuf…的問題

ubuntu16.04下編譯caffe出現.build_release/lib/libcaffe.so: undefined reference to google ::protobuf…的問題

人工智慧/機器學習/深度學習交流QQ群:811460433

程式設計師深度學習微信公眾號:

ubuntu16.04下編譯caffe出現.build_release/lib/libcaffe.so: undefined reference to google ::protobuf…的問題
此時你的protobuf庫與連結庫已經混亂了,終極解決方法:

終極版
既還原protobuf庫到最初狀態

sudo apt-get remove libprotobuf-dev
sudo apt-get remove protobuf-compiler
sudo apt-get remove python-protobuf
sudo rm -rf /usr/local/bin/protoc
sudo rm -rf /usr/bin/protoc
sudo rm -rf /usr/local/include/google
sudo rm -rf /usr/local/include/protobuf*
sudo rm -rf /usr/local/lib/libproto*
sudo rm -rf /usr/lib/libproto*
sudo rm -rf /usr/include/google
sudo rm -rf /usr/include/protobuf*

sudo rm -rf /usr/lib/x86_64-linux-gnu/libproto*
 


之後重開終端再重灌

sudo apt-get update
sudo ldconfig
sudo apt-get install libprotobuf* protobuf-compiler python-protobuf