答案1
答案2
如果您收到此错误。
aa_DJ.ISO-8859-1...[error] cannot open locale definition file
aa_DJ':没有那个文件或目录`
跑步时locale-gen
查看此相关答案
sudo apt-get purge locales
sudo apt-get purge language-pack-fa
sudo apt-get install locales
sudo apt-get install language-pack-fa
答案3
@Mathieu J. 在 /etc/default/locale 中
# File generated by update-locale
#LANG="en_US.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LANGUAGE="ru:en_US:en"
LANG="ru_RU.UTF-8"
来自 locale-gen
dgir@dgir-PC:~$ sudo locale-gen
[sudo] password for dgir:
Generating locales (this might take a while)...
en_AG.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_AU.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_AU': No such file or directory
done
en_BW.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_CA.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_CA': No such file or directory
done
en_DK.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_GB.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_HK.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_IE.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_IL.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_IN.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_NG.UTF-8...failed to set locale!
[error] cannot open locale definition file `da_DK': No such file or directory
done
en_NZ.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_PH.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_SG.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_US.ISO-8859-1...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_US.ISO-8859-15...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_US.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_ZA.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_ZM.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_ZW.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
ru_RU.ISO-8859-5... done
ru_RU.CP1251... done
ru_RU.KOI8-R... done
ru_RU.UTF-8... done
ru_UA.UTF-8... done
Generation complete.
dgir@dgir-PC:~$
答案4
所以。我删除了所有错误消息,例如
aa_DJ.ISO-8859-1...[error] cannot open locale definition file `aa_DJ': No such file or directory
done
因为错误太多,一条评论放不下整个日志。我只留下了没有错误的,令我惊讶的是,“语言环境”上没有英文,很奇怪,但是还有其他语言和俄语,这是我的主要语言。所以我不知道该怎么办,这太令人沮丧了,我快要疯了。
dgir@dgir-PC:~$ sudo dpkg-reconfigure locales
[sudo] password for dgir:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:ru",
LC_ALL = (unset),
LC_ADDRESS = "ru_RU.UTF-8",
LC_NAME = "ru_RU.UTF-8",
LC_MONETARY = "ru_RU.UTF-8",
LC_PAPER = "ru_RU.UTF-8",
LC_IDENTIFICATION = "ru_RU.UTF-8",
LC_TELEPHONE = "ru_RU.UTF-8",
LC_MEASUREMENT = "ru_RU.UTF-8",
LC_TIME = "ru_RU.UTF-8",
LC_NUMERIC = "ru_RU.UTF-8",
LANG = "en_US.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
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
bem_ZM.UTF-8... done
ber_MA.UTF-8... done
cmn_TW.UTF-8... done
hak_TW.UTF-8... done
mfe_MU.UTF-8... done
niu_NU.UTF-8... done
niu_NZ.UTF-8... done
ru_RU.ISO-8859-5... done
ru_RU.CP1251... done
ru_RU.KOI8-R... done
ru_RU.UTF-8... done
ru_UA.KOI8-U... done
ru_UA.UTF-8... done
sah_RU.UTF-8... done
tpi_PG.UTF-8... done
unm_US.UTF-8... done
yuw_PG.UTF-8... done
Generation complete.
*** update-locale: Error: invalid locale settings: LANG=en_US.UTF-8 LC_NAME="ru_RU.UTF-8" LC_PAPER="ru_RU.UTF-8" LC_NUMERIC="ru_RU.UTF-8" LANGUAGE="ru:en_US:en" LC_TELEPHONE="ru_RU.UTF-8" LC_MONETARY="ru_RU.UTF-8" LC_ADDRESS="ru_RU.UTF-8" LC_IDENTIFICATION="ru_RU.UTF-8" LC_MEASUREMENT="ru_RU.UTF-8" LC_TIME="ru_RU.UTF-8"
dgir@dgir-PC:~$