我曾经尝试过把我的地点设置在missing 20 (我在过去的x年里成功地做到了),现在我不能认为我缺少了什么:
$ 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
LANG=hu_HU.UTF-8
LANGUAGE=hu_HU.UTF-8
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=C.UTF-8
我尝试过的What:
sudo localectl set-locale LC_ALL=hu_HU.UTF-8
Failed to issue method call: Invalid Locale data.
(我也尝试过使用c.UTF-8的相同输出)
$ sudo update-locale
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "hu_HU.UTF-8",
LC_ALL = "C.UTF-8",
LANG = "hu_HU.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
sudo dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "hu_HU.UTF-8",
LC_ALL = "C.UTF-8",
LANG = "hu_HU.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
$ sudo nano /etc/default/locale
在这里编辑的LANG,语言,LC_ALL设置如上,没有任何效果。
重新启动了很多次整个系统。
我做错什么了?我不在乎我的预先设置,它应该更多的工作,现在没有任何问题。
谢谢你的帮助。
发布于 2023-03-08 09:22:00
因此,在花了这么多时间之后,我找到了解决方案:首先,删除所有(手动)插入的糖果:
sudo nano /etc/environment (delete rows)
sudo nano /etc/locale.conf (delete rows)
sudo nano /etc/default/locale
-> in /etc/ default /locale更改/设置为默认,例如。C.UTF-8
然后(Ubuntu 20):
nano .bashrc
source .bashrc
reboot
现在,不再有错误或警告消息:)
发布于 2023-03-07 08:57:22
如果您遇到错误消息"Ubuntu设置无效:没有这样的文件或目录“,这意味着您的Ubuntu系统中指定的区域设置无效或不受支持。
要修复此错误,可以执行以下步骤:
此命令将显示系统的当前区域设置,如语言、字符编码和其他设置。
将替换为要生成的区域设置的名称。例如,如果要生成美国英语区域设置,可以运行:
sudo locale-gen en_US.UTF-8
将替换为步骤2中生成的区域设置的名称。
sudo update-locale LANG=en_US.UTF-8
如果您继续遇到地区设置的问题,您可能需要检查/etc/default/locale或/etc/locale.conf中的系统配置文件,并确保它们被正确设置。还可以检查/var/log/syslog或/var/log/消息中的系统日志,以获得有关错误的更多信息。
https://unix.stackexchange.com/questions/738903
复制相似问题