linux locale unset

吃可爱长大的小学妹 提交于 2019-12-24 01:26:16

问题


I have a ARM based machine with ubuntu distro on it and it often feeds me with this while running various commands:

 Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "pl_PL.UTF-8"

This is output of the locale command

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
LANG=pl_PL.UTF-8
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY="pl_PL.UTF-8"
LC_MESSAGES="pl_PL.UTF-8"
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT="pl_PL.UTF-8"
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=

What should I do to stop it from popping now and then and configure it properly for the ąęśćźńół [important characters of mine]?


回答1:


OK, I found it

In some ubuntu distros on non 32bit x86 architectures it is misconfigured. I needed to

sudo apt-get install language-pack-pl

or sudo apt-get install --reinstall language-pack-pl if already installed pl is the language code. Change to Yours.

and then

cd /usr/lib/locale
sudo ln -s pl_PL.utf8 pl_PL

and it's fixed




回答2:


Of course installing the needed locales (sudo dpkg-reconfigure locales) is the best option, if you can.

But I do disable them sometimes, like follows:

unset $(locale|cut -d= -f1)



回答3:


Try:

sudo dpkg-reconfigure locales

And select locales which You want use. Next select default and finish.



来源:https://stackoverflow.com/questions/2527192/linux-locale-unset

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!