In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you when linux login prompt character set problems how to do, I hope you have something to gain after reading this article, let's discuss it!
Character set error always exists
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
Background
The company has a jenkins server, which has been using centos6.5 for historical reasons. When I suddenly log in, I prompt that there is a problem with the character set. In fact, I have been using centos7 for a long time. I have never encountered such a problem, and I am confused in the troubleshooting process.
Is a variety of character set error, invalid settings, n days later after continuous investigation, found that it was caused by glibc, shooting error process also found that can not use version 2.15, I wipe, hurry to write it down.
Troubleshooting process
1. Direct response to the character set, Baidu checked a number of documents, various configurations, various update plug-ins, but did not take effect, and then caught up with other work at hand, also delayed a few days.
Think about it carefully today, since any character set is not in effect, it should not be a character set problem, there must be something wrong with the loading process, but these days the server did not do anything, ah, bored turned under Baidu, suddenly saw the relevant posts on glibc, and then continued to search Baidu for a while, there are really other guys who have encountered similar ones, saying that you should add make localedata/install-locales when compiling, and hurry to try after understanding the method.
two。 The system defaults to 2.12, and I upgraded to 2.14 because of some plug-in requirements. I wanted to reduce it to 2.12, but on second thought, I might as well download a 2.15, recompile it, and the theory should be solved.
3. Find glibc-2.15 resources on the Internet, download, compile, install, after routine operation, point the / lib64/libc.so.6 soft link to glibc-2.15, then report the wrong Illegal instruction (core dumped), and the system can not log in, quickly repair LD_PRELOAD=/lib64/libc-2.12.so ln-sf / lib64/libc-2.12.so / lib64/libc.so.6, at least the character set failure is solved. But this won't work. After many attempts to upgrade 2.15, it finally failed, and no relevant solution was found on the Internet.
4. Helpless, think is not compatible with the system, do not give up, and try to upgrade 2.17, still routine operation, this time finally.
Concrete process
1. View the system glibc version library
Strings / lib64/libc.so.6 | grep GLIBC_
Found that the highest to 2.12, ready to upgrade to 2.17, do not install 2.15, I do not know if there is something wrong with me, anyway, I can not install it.
two。 Download and install
Enter the download directory / data/install, execute the command, do not explain the details, all understand
Wget https://ftp.gnu.org/gnu/glibc/glibc-2.17.tar.gz
Tar xvf glibc-2.17.tar.gz
Mkdir glibc-build-2.17
Cd glibc-build-2.17/
.. / glibc-2.17/configure-prefix=/usr-disable-profile-enable-add-ons-with-headers=/usr/include-with-binutils=/usr/bin
Make-J8 & & make install & & make localedata/install-locales
3. Verification
Strings / lib64/libc.so.6 | grep GLIBC
You don't have to replace the / lib64/libc.so.6 file, and the file soft link points to glibc-2.17, so we're done.
After reading this article, I believe you have a certain understanding of "what to do if there is a problem with the character set when linux login". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.