Introduction

Perl is great. However, error messages are not something we enjoy. If your environment variables are misconfigured or nothing is defined at the system level, you may encounter problems when launching Perl.

Problem

Here is what you might encounter when launching Perl:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "fr_FR@euro"
    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

Solution

Debian

  • To solve the problem, make sure that “fr_FR@euro” is included in your system locales:
1
dpkg-reconfigure locales
  • If it still doesn’t work, here’s what you can do:
1
dpkg-reconfigure console-data

When it asks for the default locale, set it to “none”.

  • Then, for your shell, you need to set some minimum configuration:
1
2
3
export LANGUAGE=fr_FR@euro
export LC_ALL=fr_FR@euro
export LANG=fr_FR@euro

Ubuntu

Solution 1

Execute this command:

1
sudo locale-gen fr_FR@euro

Solution 2

Add this to the file /var/lib/locales/supported.d/local:

1
fr_FR.UTF-8 @euro

For the rest, follow the Debian method described above.

Last updated 19 Nov 2008, 07:14 +0200. history