学以致用

focus on Python , C++, and some interest in Go and R

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

when using Hugo encountered the following errors:

hugo: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by hugo)
hugo: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by hugo)
hugo: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by hugo)

And after googling the somewhile and doing a lots tests, and confirmed installed the latest gcc helped fixing the error on CentOS 7.9

# solutions
# check libc
strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX

# install new versions of gcc
wget http://mirror.ghettoforge.org/distributions/gf/el/7/gf/x86_64/gf-release-7-12.gf.el7.noarch.rpm
rpm -Uvh gf-release-7-12.gf.el7.noarch.rpm
yum install gcc10-libstdc++
rpm -ql gcc10-libstdc++.x86_64

find / -name "libstdc++.so.6*"
cp /opt/gcc-10.2.1/usr/lib64/libstdc++.so.6.0.28 /usr/lib64/
cd /usr/lib64
rm libstdc++.so.6
ln -s libstdc++.so.6.0.20 libstdc++.so.6

posted on 2021-08-26 16:21  Jerry.Kwan  阅读(819)  评论(0编辑  收藏  举报