错误的 ELF 类:ELFCLASS32 [英] wrong ELF class: ELFCLASS32

查看:27
本文介绍了错误的 ELF 类:ELFCLASS32的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Solaris 机器上运行我的应用程序时,我收到指向某个 .so 文件的错误.但是,该应用程序在我的 Windows 机器上运行得很好.如果我没记错的话,我的应用程序需要 64 位版本,但我在 Solaris 机器上只有 32 位版本的 .so 文件.有没有办法解决这个问题,以便它使用 32 位版本?我知道它与字节码无关,但可能与 JVM 有关.我尝试使用 -d32 或 -d64 运行,但没有效果.

I'm getting this error pointing to some .so file when running my application on a Solaris machine. However, the application runs just fine in my Windows machine. If I'm not mistaken, my application is expecting for the 64-bit version but I only have a 32-bit version of the .so file in the Solaris machine. Is there a way I can fix this so it will use the 32-bit version instead? I understand it has nothing to do with the bytecodes but probably with the JVM. I tried running using -d32 or -d64 but it has no effect.

更新:

这是确切的错误:

Exception in thread "main" java.lang.UnsatisfiedLinkError: librvjs11.so: ld.so.1: java: fatal: librvjs11.so: wrong ELF class: ELFCLASS32<br>
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)<br>
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)<br>
    at java.lang.ClassLoader.loadLibrary(Unknown Source)<br>
    at java.lang.Runtime.loadLibrary0(Unknown Source)<br>
    at java.lang.System.loadLibrary(Unknown Source)<br>

我已经更新了 LD_LIBRARY_PATH,因此它包含了包含上述文件的目录.

I've already updated LD_LIBRARY_PATH so it includes the directory containing the file above.

推荐答案

基于 另一个答案中的对话,推断JVM是一个64位进程.使用 Solaris 中的 pflags 命令确认了这一点.

Based on the conversation in the other answer, it was inferred that the JVM was a 64-bit process. This was confirmed using the pflags command in Solaris.

显然传递给 JVM 的 -d32 标志被忽略了.这是因为 JVM 可能是 64 位的,无法在 32 位模式下运行.因此,解决方案可能是安装 32 位版本的 JVM,并使用相同的版本.

Apparently the -d32 flag passed to the JVM was being ignored. This was due to the possibility of the JVM being a 64-bit one, which was incapable of operating in the 32-bit mode. The resolution might therefore be to install a 32-bit version of JVM, and use the same.

这篇关于错误的 ELF 类:ELFCLASS32的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆