1、配置装置门路../configure –prefix=/usr/local/glibc-2.14 时报错
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/shenpeipei/glibc-2.14/build':
configure: error: no acceptable C compiler found in $PATH
—– 起因:没有 c 编译器
—– 解决办法:装置 gcc
yum install gcc
2、编辑装置 make && make install 时出错
Can't open configuration file/opt/glibc-2.14/etc/ld.so.conf: No such file or directory
—– 解决办法:
touch usr/local/glibc-2.14/etc/ld.so.conf
或者 find / -name "ld.so.conf" 能够发现 /etc/ld.so.conf 这个文件,而后复制过去就能够了 cp /etc/ld.so.conf /usr/local/glibc-2.14/etc/
3、删除 libc.so.6 后 ln、ls 等命令都不可用
—– 解决办法:
export LD_PRELOAD=/lib64/libc-2.12.so 执行完 ln -s /lib64/libc-2.14.so libc.so.6 后再改为 LD_PRELOAD=/lib64/libc-2.14.so
或者间接 export LD_PRELOAD=/lib64/libc-2.14.so 再执行 ln -s /lib64/libc-2.14.so libc.so.6
4、装置完 glibc-2.14 后发现 locale 会有问题
—– 景象一:断开从新登录会有 warning
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_TIME: cannot change locale (en_US.UTF-8): No such file or directory
—– 景象二:输出 locale, 会有报错
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
—– 起因:就是更新了 glibc-2.14 导致系统去 glibc-2.14 目录去找 locale 文件,后果没找到导致的
—– 解决办法:
mkdir /usr/local/glibc-2.14/lib/locale
cp /usr/lib/locale/locale-archive /usr/local/glibc-2.14/lib/locale/locale-archive