1、在安装protobuf之前需要先安装git、make、automake等工具,安装方法请参考:https://blog.youkuaiyun.com/sunxiaoju/article/details/85217424
2、在安装好protobuf后需要安装protobuf,依赖库,首先使用:git clone https://github.com/protocolbuffers/protobuf克隆,如下图所示:

3、然后进入到protobuf目录执行./autogen.sh,此时会出现
configure.ac:104: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.错误,如下图所示:

4、需要安装libtool,使用brew install libtool安装,如下图所示:

5、再次执行./autogen.sh即可,如下图所示:

6、然后执行:./configure,如下图所示:

7、然后执行make命令,如下图所示:

8、然后执行make install进行安装,如下图所示:

4895

被折叠的 条评论
为什么被折叠?



