apt-get warning:不支持语言环境:en_US.utf8
每次使用apt-get更新系统时都会出现此错误。 这个错误是什么意思? 关于如何纠正它的任何想法? (我正在运行Ubuntu 11.10)
通常这个错误意味着您可能在不同语言(语言环境)之间进行了更改,并且某些错误导致了错误。
您可以尝试使用重新生成语言环境列表
sudo dpkg-reconfigure locales
对我来说,结果是:
Generating locales... en_AG.UTF-8... done en_AU.UTF-8... done en_BW.UTF-8... done en_CA.UTF-8... done en_DK.UTF-8... done en_GB.UTF-8... done en_HK.UTF-8... done en_IE.UTF-8... done en_IN.UTF-8... done en_NG.UTF-8... done en_NZ.UTF-8... done en_PH.UTF-8... done en_SG.UTF-8... done en_US.UTF-8... up-to-date en_ZA.UTF-8... done en_ZM.UTF-8... done en_ZW.UTF-8... done Generation complete.
然后使用以下命令重置本地区域设置:
sudo update-locale LANG=en_US.UTF-8
即使用上面输出中的一个Locale值
在我的例子中,问题是/usr/share/initramfs-tools/hooks/root_locale
期望在/usr/lib/locale
看到各个语言环境目录,但是locale-gen
被配置为默认生成一个存档文件。
我通过运行修复它:
sudo locale-gen --purge --no-archive