下载protobuf3.5.0
(1)下载安装包到本地
https://codeload.github.com/google/protobuf/zip/v3.5.0
(2)解压到指定文件夹
cd protobuf-3.5.0
./autogen.sh
提示如下错误:
原因:为安装gmock。
解决:安装gmock-1.7.0
1. 下载解压gmock
https://github.com/paulsapps/gmock-1.7.0
unzip gmock-1.7.0.zip
2. 把gmock解压出来的目录拷贝到protobuf目录下,改名为gmock
mv gmock-1.7.0 gmock
3. vim aotogen.sh将如下代码注释
if test ! -e gmock; then
echo "Google Mock not present. Fetching gmock-1.7.0 from the web..."
curl -O https://googlemock.googlecode.com/files/gmock-1.7.0.zip
unzip -q gmock-1.