잘못된 Ubuntu 로캘: 해당 파일이나 디렉터리가 없습니다.

잘못된 Ubuntu 로캘: 해당 파일이나 디렉터리가 없습니다.

우분투 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

내가 시도한 것:

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, LANGUAGE 및 LC_ALL을 편집하지만 아무런 효과가 없습니다.

전체 시스템이 여러 번 다시 시작되었습니다.

내가 뭘 잘못했나요? 내가 선호하는 로케일은 신경 쓰지 않습니다. 이제 아무런 문제 없이 더 효율적으로 작동할 것입니다.

도움을 주셔서 감사합니다.

답변1

그래서 많은 시간을 보낸 후에 해결책을 찾았습니다. 먼저 다음에서 (수동으로) 삽입된 모든 구성을 제거합니다.

sudo nano /etc/environment (delete rows)
sudo nano /etc/locale.conf (delete rows)
sudo nano /etc/default/locale

--> /etc/default/locale에서 기본값으로 변경/설정합니다. 예: C.UTF-8

그런 다음 (우분투 20):

nano .bashrc

--> 위와 같이 여기에 기본값을 추가합니다.

source .bashrc
reboot

이제 더 이상 오류나 경고 메시지가 없습니다 :)

관련 정보