Glibc编译报错:*** These critical programs are missing or too old: as ld gcc

Glibc编译报错:*** These critical programs are missing or too old: as ld gcc_第1张图片

Binutils版本升级

这里是binutils版本过低导致, 查看已部署版本

 

 

上传离线升级包

 

 

[root@sdw1 glibc]# tar -zxvf binutils-2.32.tar.gz

[root@sdw1 glibc]# cd binutils-2.32/ 

[root@sdw1 binutils-2.32]# ./configure --prefix=/usr/local/binutils

[root@sdw1 binutils-2.32]# make && make install

大约耗时5分钟

验证编译是否成功

[root@sdw1 bin]# cd /usr/local/binutils/bin/

[root@sdw1 bin]# ./ld –v

[root@sdw1 bin]# ./as –v

备份

[root@sdw1 glibc]#  mv /usr/bin/ld /usr/bin/ld_back

[root@sdw1 glibc]# mv /usr/bin/as /usr/bin/as_back

创建软链接

[root@sdw1 bin]# ln -s /usr/local/binutils/bin/ld /usr/bin/ld

[root@sdw1 bin]# ln -s /usr/local/binutils/bin/as /usr/bin/as

验证默认配置是否正确

[root@sdw1 bin]# cd /

[root@sdw1 /]# ld –v

[root@sdw1 /]# as –v

Glibc编译报错:*** These critical programs are missing or too old: as ld gcc_第2张图片

再次编译

[root@sdw1 tmpdir]# cd /mnt/glibc/glibc-2.29/tmpdir &&

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

 

你可能感兴趣的:(Glibc编译报错:*** These critical programs are missing or too old: as ld gcc)