下载需要的版本。
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8[root@localhost ~]# tar xvf glibc-2.14.tar.gz
[root@localhost ~]# cd glibc-2.14
[root@localhost glibc-2.14]# mkdir build
[root@localhost glibc-2.14]# cd ./build
[root@localhost build]# ../configure --prefix=/opt/glibc-2.14
[root@localhost build]# make -j4
[root@localhost build]# make install
结果还给我报错:
1
2
3
4
5
1
2
3
4
5mawk: scripts/gen-sorted.awk: line 19: syntax error at or near ]
mawk: scripts/gen-sorted.awk: line 19: runaway regular expression /, "", subd ...
make[1]: *** No rule to make target `/mnt/lfs/sources/glibc-build/Versions.all', needed by `/mnt/lfs/sources/glibc-build/abi-versions.h'. Stop.
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.14.1'
make: *** [all] Error 2
5,需要安装
1
1sudo apt-get install gawk
6,重新编译吧。
7,测试:
export LD_LIBRARY_PATH=/opt/glibc-2.14/lib:$LD_LIBRARY_PATH
上文来自:http://blog.csdn.net/guoer9973/article/details/50680945
make install出现错误:Can't open configuration file /opt/glibc-2.14/etc/ld.so.conf: No such file or directory。
ld.so.conf文件缺少:
cp -r /etc/ld.so.c* /opt/glibc-2.14/etc/
ln -sf /opt/glibc-2.14/lib/libc-2.14.so /lib64/libc.so.6
strings /opt/glibc-2.14/lib/libc.so.6 |grep GLIBC