glibc-2.28安装

该文章已生成可运行项目,

1、升级GCC

        参考 通过SCL源安装GCC-CSDN博客

2、升级make

# 升级 make(默认为3 升级为4)
wget http://ftp.gnu.org/gnu/make/make-4.3.tar.gz
tar -xzvf make-4.3.tar.gz && cd make-4.3/
./configure  --prefix=/usr/local/make
make && make install
cd /usr/bin/ && mv make make.bak
ln -sv /usr/local/make/bin/make /usr/bin/make

3、下载glibc

wget http://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz
tar xf glibc-2.28.tar.gz 
cd glibc-2.28/ && mkdir build  && cd build

4 、lnss_test2错误

        make install时候lnss_test2错误:

 修改test-installation.pl文件:

vim scripts/test-installation.pl

在文件的128行新增$name ne “nss_test2”,如下图所示:
在这里插入图片描述

5、config参数

# ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include  --with-binutils=/usr/bin
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --disable-sanity-checks --disable-werror --enable-obsolete-nsl
make && make install

--with-binutils=/usr/bin:     

        这个参数不用,因为gcc临时启用,不在这个目录下;要用这个参数就需要通过ln把gcc链接到/usr/bin下;

enable-obsolete-nsl:
        如果执行configure命令是不带参数,make install过程会有出现报错:undefined reference to '_nsl_default_nss@GLIBC_PRIVATE

6、安装

make -j 10
# make localedata/install-locales -j 10
make install -j 10

结果:

本文章已经生成可运行项目
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值