error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64
Asked Answered
C

3

7

I am trying to install Qt in my CentOS system. While building the library, I'm getting this error:

/root/capture/qt-everywhere-opensource-src-4.7.0/bin/qmake: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64
/root/capture/qt-everywhere-opensource-src-4.7.0/bin/qmake: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64
Corcyra answered 19/10, 2010 at 11:3 Comment(2)
Looks like your 32-bit system is trying to load a 64-bit library.Acetous
"Looks like your 32-bit system is trying to load a 64-bit library." - No, a 32-bit binary is trying to load a 64 bit binary. This could happen on a 32 or 64 bit system.Lianaliane
C
6

It seems the softlink of the libstdc++.so.6 has been changed and is pointing to libstdc++.so.6.0.13 (64-bit?). I just changed the softlink by issuing the following command (in /usr/lib folder):

rm -f libstdc++.so.6
ln -s ./libstdc++.so.6.0.8 ./libstdc++.so.6
Corcyra answered 19/10, 2010 at 11:55 Comment(0)
B
4

I was having this problem running binaries compiled with g++ under a 64bit ubuntu 14.04 installation.

I installed g++-multilib and everything runs fine now

sudo apt-get install g++-multilib 
Boehm answered 13/5, 2015 at 13:41 Comment(0)
F
1
yum reinstall $(rpm -qa)

The above command will resolve all the issue in centos.

Fortitude answered 17/3, 2019 at 1:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.