1、在安装protobuf之前需要先安装git、make、automake等工具,安装方法请参考:https://blog.csdn.net/sunxiaoju/article/details/85217424

2、在安装好protobuf后需要安装protobuf,依赖库,首先使用:git clone https://github.com/protocolbuffers/protobuf克隆,如下图所示:

mac编译安装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.错误,如下图所示:

mac编译安装protobuf

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

mac编译安装protobuf

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

mac编译安装protobuf

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

mac编译安装protobuf

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

mac编译安装protobuf

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

mac编译安装protobuf

相关文章:

  • 2022-12-23
  • 2021-08-31
  • 2021-07-12
  • 2021-05-20
  • 2021-05-16
  • 2022-01-01
  • 2022-12-23
  • 2021-06-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
  • 2021-12-13
  • 2021-05-21
  • 2021-12-18
相关资源
相似解决方案