在 Hetzner 服务器上安装了全新的 Ubuntu 13.10 64 位。安装后立即尝试执行 apt-get update 和 apt-get dist-upgrade。几乎所有 apt-get 操作都出现以下错误
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_CTYPE = "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_ALL to default locale: No such file or directory
在 Google 上搜索了很多次,尝试了很多解决方案。没有成功。仍然是同样的警告。非常烦人,不知道背后的原因是什么。
答案1
您的文件可能/etc/default/locale
错误地包含以下行
LC_CTYPE="UTF-8"
如果是,只需删除该行。(没有“UTF-8”语言环境名称。)