linux安装python3.7.3时关于glibc-2.14的问题

安装3.7时需升级基础库glibc版本至2.14(血泪史)
参考文档:
https://www.cnblogs.com/kevingrace/p/8744417.html
设置完成没有问题,但是后来发现glibc与locale不兼容,造成采集入库数据都是乱码,造成了恶劣影响,所以还是不要轻易动基础库
后参考文档:
https://blog.csdn.net/supersilly/article/details/84754875
在make install 之后需要make localedata/install-locales
解决登录时出现的:

-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

本来打算不直接解决版本不兼容问题,间接解决,参考:
https://www.linuxprobe.com/lowarning-setlocale.html
按照第一种方法确实有效,再次登录没有发现warning,但是执行查询系统时间还是有问题,以及采集入库的数据还是乱码,不得不重新编译 glibc-2.14
…/configure --prefix=/usr/local/glibc-2.14
make && make install && make localedata/install-locales

你可能感兴趣的:(python,linux)