Java symbol lookup error: /usr/lib64/jvm/java-11-openjdk-11/lib/libnio.so: undefined symbol: initInetAddressIDs

Java symbol lookup error: /usr/lib64/jvm/java-11-openjdk-11/lib/libnio.so: undefined symbol: initInetAddressIDs

我在 suse linux 服务器中使用 openjdk-11。当我尝试使用 -64 位标志 运行 我的 cpp 构建时,我收到此错误:

Java symbol lookup error: /usr/lib64/jvm/java-11-openjdk-11/lib/libnio.so: undefined symbol: initInetAddressIDs

这是我的 ldd 警告:

you do not have execution permission for `/usr/lib64/jvm/java-11-openjdk/lib/libnio.so' linux-vdso.so.1 (0x00007fff32bd7000) libjava.so => /usr/lib64/jvm/java-11-openjdk/lib/libjava.so libnet.so => /usr/lib64/jvm/java-11-openjdk/lib/libnet.so libpthread.so.0 => /lib64/libpthread.so.0 libdl.so.2 => /lib64/libdl.so.2 (0x00007f73ee49e000) libc.so.6 => /lib64/libc.so.6 (0x00007f73ee0e4000) libjvm.so => not found libverify.so => /usr/lib64/jvm/java-11-openjdk/lib/libverify.so /lib64/ld-linux-x86-64.so.2

我不是 Java 程序员,不知道该做什么。有大神帮我出坑吗?

您的 ldd 输出表明缺少 libjvm.so。 尝试在您的 OpenJDK 路径中找到此文件(尝试查看 /jre/lib/amd64/server/ ),然后尝试将此路径添加到 $LD_LIBRARY_PATH