升級gcc,glibc庫途中遇到的各種問題
解壓:
[[email protected] opt]# tar -zxvfglibc-2.19.tar.gz
[[email protected] glibc-2.19]# exportCFLAGS="-g -O2 -march=i686"
錯誤一
配置:
[[email protected] glibc-build]# ../configure--prefix=/usr/local/glibc-2.19
錯誤提示:
configure: error:
*** These critical programs are missing ortoo old: as ld gcc
*** Check the INSTALL file for requiredversions.
解決方法:
(錯誤原因查不到,自以為是gcc版本低,glibc版本高,使用較低的gblic,最笨的方法)
錯誤二(安裝glibc-2.11.1)
解壓:[[email protected] glibc-build]# tar -jxvf glibc-2.11.1.tar.bz2
配置:
./configure --prefix=/usr/local/glibc-2.11.1
錯誤提示一
l *** LD_LIBRARY_PATH shouldn't contain the current directory when
*** building glibc. Please change theenvironment variable
*** and run configure again.
解決方法:
刪除LD_LIBRARY_PATH變數的內容
[[email protected] glibc-build]# echo $LD_LIBRARY_PATH
:/usr/local/mpc-0.8.1/lib:/usr/local/gmp-4.3.2/lib:/usr/local/mpfr-2.4.2/lib:/usr/local/gcc-4.8.3/lib
[[email protected] glibc-build]# LD_LIBRARY_PATH=
錯誤提示二
l cnfigure: error:gcc must provide the <cpuid.h> header
[[email protected] glibc-build]#
解決方法:
指定<cpuid.h>檔案--with-headers=/usr/include
[[email protected] glibc-build]# ../configure --prefix=/usr/local/glibc-2.11.1--with-headers=/usr/include
錯誤提示三
l configure: error: GNU libc requires kernel headerfiles from
Linux 2.0.10 or later to be installed before configuring.
The kernel header files are found usually in /usr/include/asm and
/usr/include/linux; make sure these directories use files from
Linux 2.0.10 or later. Thischeck uses <linux/version.h>, so
make sure that file was built correctly when installing the kernelheader
files. To use kernel headers notfrom /usr/include/linux, use the
configure option --with-headers.
解決方法:
(目前不清楚,這個是大多數gblic安裝出錯的最根本問題)
最後下載了glibc-2.9終於安裝成功