centos /lib64/libc.so.6: version `GLIBC_2.28' not found (required by


解決方案:升級glibc到2.28版本

wget  https://mirror.bjtu.edu.cn/gnu/libc/glibc-2.28.tar.xz

tar -xf glibc-2.28.tar.xz -C /usr/local/

cd /usr/local/glibc-2.28/

mkdir build

cd build/

../configure --prefix=/usr/local/glibc-2.28

運行到…/configure --prefix=/usr/local/glibc-2.28時報錯

報錯1:

configure: error: in `/root/test/glibc-2.28/build’:
configure: error: no acceptable C compiler found in $PATH

yum install gcc -y

報錯2:

These critical programs are missing or too old: make bison compiler
Check the INSTALL file for required versions.

解決方案: make bison compiler太過老舊。按下文方法解決。

centos 升級GCC編譯器

yum -y install centos-release-scl

yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-binutils

scl enable devtoolset-8 bash

echo "source /opt/rh/devtoolset-8/enable" >>/etc/profile

升級make

wget http://ftp.gnu.org/gnu/make/make-4.2.tar.gz

tar -xzvf make-4.2.tar.gz

cd make-4.2

sudo ./configure

sudo make

sudo make install

sudo rm -rf /usr/bin/make

sudo cp ./make /usr/bin/

make -v

升級glibc-2.28

wget  https://mirror.bjtu.edu.cn/gnu/libc/glibc-2.28.tar.xz

tar -xf glibc-2.28.tar.xz -C /usr/local

cd /usr/local/glibc-2.28/

mkdir build

cd build/

yum install -y bison

sudo ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

make  //make 運行時間較長,可能會有半小時

make install

通過strings /lib64/libc.so.6 |grep GLIBC查詢是否存在glibc-2.28版本

image

問題解決!

原文鏈接:centos7-安裝docker-compose 報錯/lib64/libc.so.6: version `GLIBC_2.28‘ not found_wangying202的博客-CSDN博客


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM