下載
https://github.com/google/protobuf/releases 找到對應版本下載
編譯
cd protobuf./autogen.sh./configuremake
安裝
make install
查看
protoc --version
Points
- ./autogen.sh是獲取GoogleMock,並生成對應的configure腳本
- ./configure是進行環境檢測,並生成對應的makefile或Makefile
--prefix=/usr/local可以指定安裝路徑 - make,按照makefile編譯工程
- make install,執行makefile里面的install部分,進行安裝
--prefix=/usr/local可以指定安裝路徑
