perl: warning: Setting locale failed

Bug #748261 reported by Виктор Донос
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: apt

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
 LANGUAGE = "en_US:en",
 LC_ALL = (unset),
 LC_MESSAGES = "en_US.UTF-8",
 LANG = "ru_RU.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 or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Revision history for this message
Julian Andres Klode (juliank) wrote :

Not a bug, but a wrongly configured locale.

Changed in apt (Ubuntu):
status: New → Invalid
Revision history for this message
Armindo Silva (deathon2legs) wrote :

It's still a bug because this is happens on every ubuntu (server and desktop) I used on the last couple of years and besides during installation (where I choose English as language, UTF8 for encoding, Portuguese as keyboard layout and Europe/Lisbon for the timezone.
So it is a problem with the ubuntu installer, not a problem caused by a misconfiguration made by the user.

# locale
 locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=pt_PT.UTF-8
LC_TIME=pt_PT.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=pt_PT.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=pt_PT.UTF-8
LC_NAME=pt_PT.UTF-8
LC_ADDRESS=pt_PT.UTF-8
LC_TELEPHONE=pt_PT.UTF-8
LC_MEASUREMENT=pt_PT.UTF-8
LC_IDENTIFICATION=pt_PT.UTF-8
LC_ALL=

WORKAROUND:

$ sudo vim /etc/environment

_ at the end of the file add: LC_ALL="en_US.UTF-8"
_ or your favorite encoding

$ sudo reboot

Changed in apt (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Julian Andres Klode (juliank) wrote :

But definitely Not an APT bug.

affects: apt (Ubuntu) → ubuntu
Revision history for this message
iGadget (igadget) wrote :

I concur with Armindo, this is a bug (in the installer?) which has been around for many, many years. Apparently the system fails to do a proper locale-gen at the end of the installation.

When installing Ubuntu, I always choose US English as language, time zone The Netherlands, keyboard layout US International (dead keys). This combination of settings *ALWAYS* produces this result:

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

Running "sudo locale-gen nl_NL.UTF-8" solves the issue, so IMHO this "locale-gen step" should be automatically done during the installation of the system (and if this is done already, it's doing it wrong and should be fixed).

Revision history for this message
marco.pallotta (marco-pallotta) wrote :

same similar error happens when I try to install Ubuntu 14.04.4-desktop-amd64: after partitioning the installer shows a popup with all question marks and if I go to read for logs, from command line, I see the errors:

perl: warning: setting locale failed
perl: warning: Please check that your locale settings:
 LANGUAGE = "it_IT.UTF-8"
 LC_ALL = (unset)
 LANG = "it_IT.UTF-8"
are supported and installed on your system

Revision history for this message
marco.pallotta (marco-pallotta) wrote :

after some tests I realized that popup with all question marks was related to fake raid and not to "setting locale failed".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.