Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Perl warning Setting locale failed

By editor , 27 August, 2016
Question

I have following error message when installing perl package, how to resolve this probleme ?

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_GB:en",
    LC_ALL = (unset),
    LC_PAPER = "fr_FR.UTF-8",
    LC_ADDRESS = "fr_FR.UTF-8",
    LC_MONETARY = "fr_FR.UTF-8",
    LC_NUMERIC = "fr_FR.UTF-8",
    LC_TELEPHONE = "fr_FR.UTF-8",
    LC_IDENTIFICATION = "fr_FR.UTF-8",
    LC_MEASUREMENT = "fr_FR.UTF-8",
    LC_NAME = "fr_FR.UTF-8",
    LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory

For that, regenerate locals and setup locale settings.

Generate locals

Ex:# locale-gen en_US.UTF-8
Or :# locale-gen fr_FR.UTF-8

An also you can use # localedef -i en_US -f UTF-8 en_US.UTF-8

Setup local settings

Example:
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

Note : The dpkg-reconfigure locales command will open a dialog under Debian for selecting the desired locale. This dialog will not appear under Ubuntu.

If you have a warning like:

update-locale: Warning: LANGUAGE (en_GB:en) is not compatible with LANG (C.UTF-8). Disabling it.

Solution : Select another language Ex : 'en_GB.UTF-8' as default system language (dpkg-reconfigure locale)

Another solution : Add to .bshrc

# Add Locales to .bashrc (nano  ~/.bashrc)
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

# Reload
source ~/.bashrc

 

Tags

  • Server
  • Shell
  • Linux

Comments

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer