解决M1芯片编译protoc报错

米斯特程序猿 2022年11月19日 212次浏览
  • 最近换了M1的mac,GPRC的接口不能编译打包了,Google了一把找到解决方案

image.png

  • 网上有多种解决办法,下面的办法简单有效
    • 配置maven的settings.xml 文件,如图
      image.png
            <profile>
                <id>apple-silicon</id>
                <properties>
                    <os.detected.classifier>osx-x86_64</os.detected.classifier>
                </properties>
            </profile>
<activeProfile>apple-silicon</activeProfile>

参考链接