Agnus Dei (jackal) wrote in linux,

How to fix the "LANGUAGE = (unset)" perl errors on Debian

Posting this because I couldn't find a solution posted for a non-interactive way to fix this ...

THE PROBLEM: Perl gives LANGUAGE = unset errors.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
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



INTERACTIVELY FIX (debian):

# dpkg-reconfigure locales
(Select your language and hit "OK")


PROGRAMTICALLY FIX (debian):

# sed -i "s/^# en_US/en_US/" /etc/locale.gen

# grep -v "^#" /etc/locale.gen
en_US ISO-8859-1
en_US.ISO-8859-15 ISO-8859-15
en_US.UTF-8 UTF-8

# /usr/sbin/locale-gen
Generating locales (this might take a while)...
en_US.ISO-8859-1... done
en_US.ISO-8859-15... done
en_US.UTF-8... done
Generation complete.

# update-locale LANG=en_US.UTF-8
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded  

  • 2 comments