Skip to content

Locale failed error

Aditya Bharadwaj edited this page Sep 2, 2016 · 1 revision

Locale Issue Ubuntu/Debian:

Sometimes when installing packages you might get this warning:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = "",
	LC_MONETARY = "it_IT.UTF-8",
	LC_NUMERIC = "it_IT.UTF-8",
	LC_MESSAGES = "it_IT.UTF-8",
	LC_COLLATE = "it_IT.UTF-8",
	LC_CTYPE = "it_IT.UTF-8",
	LC_TIME = "it_IT.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Put this in your ~/.bashrc

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

And run:

$ source ~/.bashrc

Then run these two commands:

$ sudo locale-gen en_US.UTF-8
Generating locales...
  en_US.UTF-8... up-to-date

$ sudo dpkg-reconfigure locales

Generating locales...
  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.UTF-8... up-to-date
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.

Your problem should now be solved.

Clone this wiki locally