下載glibc-2.23.tar.gz到服務器
1、先運行下面命令解壓到當前路徑:
tar -zxvf glibc-2.17.tar.gz
在 https://ftp.gnu.org/gnu/glibc/ 或者 http://ftp.twaren.net/Unix/GNU/gnu/libc/ 裏選擇下載 對應版本.
2、編譯安裝
cd glibc-2.23
./configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
此時報錯
方法: 需要新建一個目錄
mkdir build
cd build
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
然後又出現了新的問題
解決方法如圖所示:
分別執行:
echo $LD_LIBRARY_PATH
export LD_LIBRARY_PATH=
echo $LD_LIBRARY_PATH
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
3、
安裝
make
make install