Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 280
Christian Abella Avatar asked Oct 19 '10 11:10

Christian Abella


3 Answers

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
like image 98
Christian Abella Avatar answered Sep 18 '22 00:09

Christian Abella


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 
like image 23
mwm Avatar answered Sep 18 '22 00:09

mwm


yum reinstall $(rpm -qa)

The above command will resolve all the issue in centos.

like image 41
Arcsoftech Avatar answered Sep 22 '22 00:09

Arcsoftech