I try to use gradle:bootBuildImage build native image on macos apple silicon. Native image build success, but image cant run on same machine with error rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2. Try to set -march=native -march=compatibility fail too

Comment From: scottfrederick

The Paketo CNB builder that is used by default by the Spring Boot plugins does not currently support ARM architectures. See this buildpacks issue for more details.

There is an alternative CNB builder that does support ARM.