protoc-gen-grpc-java not available on apple m1
See original GitHub issueWhat version of gRPC-Java are you using?
1.34.0
What is your environment?
osx 11.0.1
What did you expect to see?
build success
What did you see instead?
[INFO] --- protobuf-maven-plugin:0.6.1:compile (default-cli) @ grpc ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.720 s
[INFO] Finished at: 2020-12-03T16:37:02+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default-cli) on project grpc: Unable to resolve artifact: Missing:
[ERROR] ----------
[ERROR] 1) com.google.protobuf:protoc:exe:osx-aarch_64:3.12.0
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.12.0 -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.12.0 -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR] Path to dependency:
[ERROR] 1) com.reinmind:grpc:jar:1.0-SNAPSHOT
[ERROR] 2) com.google.protobuf:protoc:exe:osx-aarch_64:3.12.0
[ERROR]
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR]
[ERROR] for artifact:
[ERROR] com.reinmind:grpc:jar:1.0-SNAPSHOT
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] aliyunmaven (https://maven.aliyun.com/repository/public, releases=true, snapshots=false)
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Steps to reproduce the bug
mvn protobuf:compile
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:68 (19 by maintainers)
Top Results From Across the Web
it will build error "Could not find protoc-3.0.0-osx-a...
Discussion on: Config Gradle to generate Java code from Protobuf ... For M1 (Apple Silicon),it will build error "Could not find protoc-3.0.0-osx- ...
Read more >Summary of MacBook use problems with m1 chip - Medium
Modify the dependencies to specify the use of x86_64 packages. Problem see the solution:. protoc-gen-grpc-java not available on apple m1 · Issue #7690...
Read more >Could not find protoc-3.9.2-osx on Flutter/Android build
I have found a solution based on : https://github.com/grpc/grpc-java/issues/7690. I have create file : $HOME/.gradle/gradle.properties with ...
Read more >Develop on Apple Silicon (M1) macOS
However, Apple M1 does not work with protobuf 2.5.0 - when installing protobuf from source you will get unsupported CPU architecture error.
Read more >GRPC-Java v1.43.0 Released - Google Groups
Users not enabling grpc-census are not impacted by this bug (#8706). New Features. protoc-gen-grpc-java plugin support for Apple M1 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
Top Related Hashnode Post
No results found
Top GitHub Comments
To manually specify the classifier, for Gradle:
I’m less familiar with the Maven plugin, but I think it may be something like:
You can do the same for protoc-gen-grpc-java.
for me, add this to
~/.m2/settings.xml
, it worked: