Using native OpenGL
/home/software/Mercury_3.3/c_linux/bin/mercury.x: error while loading shared libraries: libGL.so.1: wrong ELF class: ELFCLASS64
closed as unclear what you're asking by guntbert, Braiam, Eric Carvalho, Richard, Lucio Apr 1 '14 at 2:32
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Looks like your application is a 32 bits application but is trying to load a 64bits library.
On a 64bits installation, you can have both version (32 bits and 64 bits) of any libraries installed. 32bits can be found under
On Linux, libraries are search using a path sequence, a little bit like the PATH variable list all the directories to look for the executable you want to run when no path is given.
This sequence to search for libraries is defined in a variable called
The problem is that the directory for the 64bits versions comes before the directory with the 32bits versions. And usually the name of the library is identical for the 32bits and 64bits version.
You can overcome this problem by creating a small startup script for your application like this one :
If there is already a script to start this application, you can just add the line
to it, near the top.
I'll prefer the first method, creating a specific script, as any startup script provided by the package will be probably overwritten in case of update.