Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running a bash script and it gives the following error. Anyone has any idea how to sort this out?

error while loading shared libraries: libomniORB4.so.1: wrong ELF class: ELFCLASS64

share|improve this question

closed as off-topic by dobey, Luis Alvarado Jul 25 at 21:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – dobey, Luis Alvarado
If this question can be reworded to fit the rules in the help center, please edit the question.

    
    
@bain, thanks but I'm not compiling anything. –  Mikael S. Jul 25 at 21:13
    
Try to see echo $LD_PRELOAD, in case it points to the shared library try to unset the variable in the script. (Which script is it?) –  Hastur Jul 25 at 21:20

1 Answer 1

up vote 2 down vote accepted

The linker is complaining that it can't link a 64-bit library to a 32-bit program. If you have a 32-bit system you should install 32-bit programs and libraries. If you have a 64-bit system, you can install either 32-bit or 64-bit programs, but if you install 32-bit you have to ensure that it will gets linked against 32-bit libraries. If that is the case, see this answer for how to do so.

share|improve this answer
    
Thanks. Would you tell me how I can install the 32 bit version of omniORB libs? –  Mikael S. Jul 25 at 21:34
1  
apt-get install libomniorb4-1:i386 –  bain Jul 25 at 21:37
    
Damn, thanks man. I've been banging my head for a while. –  Mikael S. Jul 25 at 21:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.