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

荒凉一梦 提交于 2019-11-29 20:10:12

问题


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

回答1:


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



回答2:


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 



回答3:


yum reinstall $(rpm -qa)

The above command will resolve all the issue in centos.



来源:https://stackoverflow.com/questions/3967661/error-while-loading-shared-libraries-libstdc-so-6-wrong-elf-class-elfclass6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!