如何修复安装 vim 时出现“设置区域设置失败”错误?

如何修复安装 vim 时出现“设置区域设置失败”错误?

通过软件中心安装时vim,出现此错误

installArchives() failed: perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    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
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    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
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    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
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    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
Setting up install-info (4.13a.dfsg.1-10ubuntu4) ...
/etc/environment: line 1: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: No such file or directory
dpkg: error processing install-info (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 install-info
Setting up install-info (4.13a.dfsg.1-10ubuntu4) ...
/etc/environment: line 1: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: No such file or directory
dpkg: error processing install-info (--configure):
 subprocess installed post-installation script returned error exit status 1

答案1

您需要生成本地文件。这可以通过使用命令来完成locale-gen。所需的参数是您要为系统设置的语言和字符集。

例如,如果我希望我的系统使用 UTF-8 的英语(美国),我将运行以下命令。

locale-gen en_US.UTF-8

看起来你来自印度,可能想要运行类似的东西。

locale-gen en_IN.ISO8859-1

答案2

第一的:

sudo apt-get purge locales

然后:

sudo aptitude install locales

以及著名的:

sudo dpkg-reconfigure locales

这将删除系统中的语言环境,然后重新安装语言环境并将 libc6 从 2.19 降级到 2.13(很可能是问题所在)。然后再次配置语言环境。

相关内容