解决M1芯片编译protoc报错

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

image.png

image.png

  • 网上有多种解决办法,下面的办法简单有效
    • 配置maven的settings.xml 文件,如图
      image.png

      image.png

  1. <profile>
  2. <id>apple-silicon</id>
  3. <properties>
  4. <os.detected.classifier>osx-x86_64</os.detected.classifier>
  5. </properties>
  6. </profile>
  1. <activeProfile>apple-silicon</activeProfile>

参考链接