개인 공부/리눅스

Centos 7, /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found

RyoTTa 2021. 5. 27. 13:04
반응형
$ sudo find / -name "libstdc++.so.6*"

 결과

/home/osang915/gcc-5.4.0-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.21
/home/osang915/gcc-5.4.0-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6
/home/osang915/gcc-5.4.0-build/stage1-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.21
/home/osang915/gcc-5.4.0-build/stage1-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6
/home/osang915/gcc-5.4.0-build/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.21
/home/osang915/gcc-5.4.0-build/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6
find: ‘/run/user/1000/gvfs’: Permission denied
/var/lib/docker/overlay2/7403de125b809d8a736c3bbeaa327aa4103fcb0dfd18b39f828be1b8d00bcf4b/diff/usr/lib/libstdc++.so.6
/var/lib/docker/overlay2/7403de125b809d8a736c3bbeaa327aa4103fcb0dfd18b39f828be1b8d00bcf4b/diff/usr/lib/libstdc++.so.6.0.28
/var/lib/docker/overlay2/078a441faebf1cbd107a9cee76c3b3fe70e9f4752c7e617f0e00019694be904e/diff/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/var/lib/docker/overlay2/078a441faebf1cbd107a9cee76c3b3fe70e9f4752c7e617f0e00019694be904e/diff/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25
/var/lib/docker/overlay2/078a441faebf1cbd107a9cee76c3b3fe70e9f4752c7e617f0e00019694be904e/diff/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25-gdb.py
/var/lib/docker/overlay2/8b21c6f861582f63e33957c4547734b4187610b9b54a82c9eaa0b82309bb9c61/merged/usr/lib/libstdc++.so.6
/var/lib/docker/overlay2/8b21c6f861582f63e33957c4547734b4187610b9b54a82c9eaa0b82309bb9c61/merged/usr/lib/libstdc++.so.6.0.28
/var/lib/docker/overlay2/303a2bd23528bc48a02a7488998f3478a66e974628a5f030c76ff49f937bc20e/merged/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/var/lib/docker/overlay2/303a2bd23528bc48a02a7488998f3478a66e974628a5f030c76ff49f937bc20e/merged/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25
/var/lib/docker/overlay2/303a2bd23528bc48a02a7488998f3478a66e974628a5f030c76ff49f937bc20e/merged/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25-gdb.py
/usr/lib64/libstdc++.so.6
/usr/lib64/libstdc++.so.6.0.19
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.py
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyc
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyo
/usr/local/lib64/libstdc++.so.6.0.21
/usr/local/lib64/libstdc++.so.6
/usr/local/lib64/libstdc++.so.6.0.21-gdb.py

 위와 같은 결과를 얻는다. 

$ strings /usr/lib64/libstdc++.so.6 | grep CXXABI

 /user/lib64/libstdc++.so.6 가 가지고있는 CXXABI의 버전을 확인할 수 있다.

 

CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_TM_1

 

 여기에는 CXXABI_1.3.8이 없어 오류가 생긴다.

$ strings /usr/local/lib64/libstdc++.so.6 | grep CXXABI
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_1.3.8
CXXABI_1.3.9
CXXABI_TM_1
CXXABI_FLOAT128
CXXABI_1.3
CXXABI_1.3.2
CXXABI_1.3.6
CXXABI_FLOAT128
CXXABI_1.3.9
CXXABI_1.3.1
CXXABI_1.3.5
CXXABI_1.3.8
CXXABI_1.3.4
CXXABI_TM_1
CXXABI_1.3.7
CXXABI_1.3.3

위 라이브러리에는 CXXABI_1.3.8이 존재한다. 따라서 해당 라이브러리를 bashrc에 LD_LIBRARY_PATH 추가해주면 된다.

 

$ nano ~/.bashrc

export LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH
반응형