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 にダウングレードされます (これが問題の原因である可能性が非常に高い)。次に、ロケールを再度構成します。

関連情報