Failed to Obtain netty-transport-native-epoll
Symptom
During the compilation, the message "Could not find artifact io.netty:netty-transport-native-epoll:jar:linux-aarch_64:4.1.43.Final..." is displayed, indicating that the libnetty_transport_native_epoll_aarch_64.so file is missing.

Key Process and Cause Analysis
Some components in Spring Cloud, such as spring-cloud-gateway, spring-cloud-gcp, and spring-cloud-contract, will pull the netty-transport-native-epoll-4.1.43.Final-linux-x86_64.jar package during the compilation. Currently, mainstream Maven repositories do not have the JAR package of the Arm64 architecture. Therefore, the libnetty_transport_native_epoll_aarch_64.so package may be missing.
Conclusion and Solution
Save the netty-transport-native-epoll-4.1.43.Final-linux-aarch_64.jar package of the Arm64 version to the local Maven repository.
- Create a /root/.m2/repository/io/netty/netty-transport-native-epoll/4.1.43.Final directory if the directory does not exist.
mkdir -p /root/.m2/repository/io/netty/netty-transport-native-epoll/4.1.43.Final
- Obtain the netty-transport-native-epoll-4.1.43.Final-linux-aarch_64.jar package.
You can also compile the JAR package by referring to netty-transport-native-epoll-4.1.43.Final-linux-aarch_64.jar Porting Guide.
wget https://mirrors.huaweicloud.com/kunpeng/maven/io/netty/netty-transport-native-epoll/4.1.43.Final/netty-transport-native-epoll-4.1.43.Final-linux-aarch_64.jar --no-check-certificate
- Save the JAR package to the local Maven repository.
\cp netty-transport-native-epoll-4.1.43.Final-linux-aarch_64.jar /root/.m2/repository/io/netty/netty-transport-native-epoll/4.1.43.Final
- Add the dependency to the netty-transport-native-epoll-4.1.43.Final-linux-aarch_64.jar package.
- Open the pom.xml file.
vim pom.xml
- Press i to enter the insert mode and add the following content below <dependencies>:
<dependency> <groupId>io.netty</groupId> <artifactId>netty-transport-native-epoll</artifactId> <version>4.1.43.Final</version> <classifier>linux-aarch_64</classifier> <scope>compile</scope> <exclusions> <exclusion> <artifactId>commons-logging</artifactId> <groupId>commons-logging</groupId> </exclusion> </exclusions> </dependency>
- Open the pom.xml file.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Recompile Spring Cloud.