Fixing perl: warning: Setting locale failed

When receiving this error:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US:en",
        LC_ALL = (unset),
        LC_MONETARY = "de_DE.utf-8",
        LC_NUMERIC = "de_DE.utf-8",
        LC_MESSAGES = "de_DE.utf-8",
        LC_COLLATE = "de_DE.utf-8",
        LC_CTYPE = "de_DE.utf-8",
        LC_TIME = "de_DE.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_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory



Try to generate the locales specified in the error message.  In this case, the de_DE.utf-8 can't be generated but de_DE.UTF-8 does work.

# locale-gen de_DE.UTF-8
Generating locales...
  de_DE.UTF-8... done
Generation complete.
# dpkg-reconfigure locales
Generating locales...
  de_DE.UTF-8... up-to-date
  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.ISO-8859-1... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.

Was this answer helpful?

 Print this Article

Also Read

Zend Server

Setting up a Zend Server from scratch: Install latest LTS Ubuntu server and enable SSH Install...

Setup oauth on Ubuntu

installing using pecl: # pecl install oauth may need to install pcre headers (debian based) #...