How to fix the "Setting locale failed" error while installing vim?

8,269

You need to generate your local files. This is done use the locale-gen command. The argument needed is the language and charset you want to set the system to.

For example, if I want my system to use English (US) with UTF-8, I would run the following command.

locale-gen en_US.UTF-8

It looks like you are from India and might want to run something like this.

locale-gen en_IN.ISO8859-1

Share:
8,269

Related videos on Youtube

shubham9182
Author by

shubham9182

Updated on September 18, 2022

Comments

  • shubham9182
    shubham9182 over 1 year

    When installing vim through Software Center , I get this error

    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
    
    • Tachyons
      Tachyons over 10 years
      Try sudo dpkg-reconfigure locale
    • shubham9182
      shubham9182 over 10 years
      it didn't work.
  • shubham9182
    shubham9182 over 10 years
    sir i tried your commands and generated all the locale files but still its showing the same error, i am new to linux please help me with this.
  • GusDeCooL
    GusDeCooL over 10 years
    not working....
  • Rajat Gupta
    Rajat Gupta about 10 years
    I think reboot might be needed..