Skip to content

Instantly share code, notes, and snippets.

@kxxoling
Created June 8, 2015 04:13
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save kxxoling/b3ac181b427c7cafbe88 to your computer and use it in GitHub Desktop.
Save kxxoling/b3ac181b427c7cafbe88 to your computer and use it in GitHub Desktop.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.utf8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
@kxxoling
Copy link
Author

kxxoling commented Jun 8, 2015

Debian/Ubuntu 安装后并不一定提供了完整的语言支持,因此需要手动安装:

locale-gen en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales

@nafplann
Copy link

nafplann commented Mar 9, 2018

thanks man

@sweety007
Copy link

Thank you

@Eulring
Copy link

Eulring commented Jul 19, 2019

It works ! thanks.

@MonsterRob
Copy link

thanks

@yingwaner
Copy link

Since I do not have administrator rights, it will be "Permission denied" when I try to run locale-gen en_US.UTF-8.
I add these three lines to my shell and it works!
Thanks!!!

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

@galatgovardhan
Copy link

Help
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

@galatgovardhan
Copy link

Also
dpkg-reconfigure locales command not found

@galatgovardhan
Copy link

Not solve the problam

bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US.UTF-8",
LC_ALL = "en_US.UTF-8",
LC_ADDRESS = "en_IN.UTF-8",
LC_NAME = "en_IN.UTF-8",
LC_MONETARY = "en_IN.UTF-8",
LC_PAPER = "en_IN.UTF-8",
LC_IDENTIFICATION = "en_IN.UTF-8",
LC_TELEPHONE = "en_IN.UTF-8",
LC_MESSAGES = "en_IN.UTF-8",
LC_MEASUREMENT = "en_IN.UTF-8",
LC_CTYPE = "en_IN.UTF-8",
LC_TIME = "en_IN.UTF-8",
LC_COLLATE = "en_IN.UTF-8",
LC_NUMERIC = "en_IN.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

usage: vncserver

@Steviey
Copy link

Steviey commented Oct 21, 2022

8 years later... WTF!!!

@sviion
Copy link

sviion commented May 9, 2023

  1. sudo apt install locales-all
  2. add this to /etc/environment
LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8

reload, if not work run this:

locale-gen en_US.UTF-8
dpkg-reconfigure locales

@ignatiusmadee
Copy link

ignatiusmadee commented Feb 5, 2024

you can try this

export LC_ALL=C

after that run this again

locale-gen en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment