解决异常:Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin...

2024-05-02后端1 分钟463 次阅读
AI 摘要鱼粮不足,AI 今天先歇着 · 正文在下面

异常

在使用 protobuf 进行编译时报错:[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default) on project provider: Unable to resolve artifact: Missing
image.png

解决

由于我的电脑是 Mac M1,处理器是 arm64 的,貌似不适配 arm 处理器,这是我原来的配置:

xml 复制代码
<protocArtifact>com.google.protobuf:protoc:3.7.1:exe:${os.detected.classifier}</protocArtifact>

我们改为指定使用 x86_64 的版本即可

xml 复制代码
<protocArtifact>com.google.protobuf:protoc:3.7.1:exe:osx-x86_64</protocArtifact>
觉得有用就点个赞,不用登录也能读

评论

0 条
登录 之后才能评论
—
还没有评论,来说第一句