mac编译安装protobuf

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进行安装,如下图所示:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值