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

image.png
-----原因:没有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

image.png
-----现象二:输入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

image.png
-----原因:就是更新了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

elina
27 声望3 粉丝

引用和评论

0 条评论