1.卸載
sudo apt-get remove libprotobuf-dev
which protoc
然后刪除路徑即可
2.安裝
sudo apt-get install autoconf automake libtool curl make g++ unzip
git clone -b v3.6.1 https://github.com/protocolbuffers/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig
protoc --version 輸出版本號成功