Christian Abella
Christian Abella

Reputation: 5797

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

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

Upvotes: 7

Views: 50970

Answers (4)

VietnameseBushes
VietnameseBushes

Reputation: 11

I tried sudo apt-get install libstdc++6:i386 to install the library for x32 bit

Upvotes: 0

Arcsoftech
Arcsoftech

Reputation: 21

yum reinstall $(rpm -qa)

The above command will resolve all the issue in centos.

Upvotes: 1

mwm
mwm

Reputation: 1973

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 

Upvotes: 4

Christian Abella
Christian Abella

Reputation: 5797

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

Upvotes: 6

Related Questions