Solve the problem of cannot execute binary file: Exec format error when manually installing JDK on Linux

Question picture


Literally speaking, this problem means that the file format being executed cannot be executed. But seeing that my jdk installation package and my linux version are both 64-bit, it stands to reason that there should be no problem of being unable to execute.
The linux system is 64-bit
The jdk installation package is also 64-bit
Until later I found a solution from a big guy: (His situation is exactly the opposite of mine. His Linux system requires the aarch version to be installed) Link

It turns out that the jdk in my Linux environment was wrong. Although it is a jdk installation package for a 64-bit Linux environment, aarch64 is a different version from the simple 64 version. See the picture below for details. You can see that my system version is non-aarch
. version, so you should install the x64
my linux kernel version
version. If it is the aarch version, it should be like this (borrowed the picture from the master ):
aarch version
In this case, you need to install the jdk of aarch64.tar.gz.

jdk official website download
After finally reinstalling the correct version, the problem was solved
View jdk version


Great gods are among the people, and I would like to thank this blogger again for the inspiration.

Guess you like

Origin blog.csdn.net/qq_45699990/article/details/122004336