dpkg-reconfigure locales doesn't set locales

Asked by Wladston Viana

When I enter

wladston@jangada:~$ sudo dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.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_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
wladston@jangada:~$

I get this message, and the locales aren't set.

What is wrong with my system ?

(ps : I got it from debootstrap)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu langpack-locales Edit question
Assignee:
No assignee Edit question
Solved by:
Nicolas DERIVE
Solved:
Last query:
Last reply:
Revision history for this message
Nicolas DERIVE (kalon33) said :
#1

Hello Wladston, try "sudo apt-get install language-support-en" or use the language support utility in System>Administration>Language Support (the one with the flags as an icon) and check if your language is well installed, and defined as default.

Hope that it helps you.

--kalon33

Revision history for this message
Wladston Viana (wladston) said :
#2

Ncolas,

Considering that this is a server, and has to be kept as light as possible, I have installed language-pack-en.

Now take a look in what happens :

wladston@jangada:~$ sudo dpkg-reconfigure locales
Generating locales...
  en_AU.UTF-8... up-to-date
  en_BW.UTF-8... up-to-date
  en_CA.UTF-8... up-to-date
  en_DK.UTF-8... up-to-date
  en_GB.UTF-8... up-to-date
  en_HK.UTF-8... up-to-date
  en_IE.UTF-8... up-to-date
  en_IN.UTF-8... up-to-date
  en_NZ.UTF-8... up-to-date
  en_PH.UTF-8... up-to-date
  en_SG.UTF-8... up-to-date
  en_US.UTF-8... up-to-date
  en_ZA.UTF-8... up-to-date
  en_ZW.UTF-8... up-to-date
Generation complete.
wladston@jangada:~$

But,
wladston@jangada:~$ echo $LANGUAGE

wladston@jangada:~$ echo $LC_ALL

wladston@jangada:~$ echo $LANG
en_US.UTF-8
wladston@jangada:~$

Looks like it still didn't set the proper variables ...

Any idea why ?

Revision history for this message
Nicolas DERIVE (kalon33) said :
#3

Is the package "locales" correctly installed on your server ?

Revision history for this message
Nicolas DERIVE (kalon33) said :
#4

sorry, it's a problem with locales sure :p
I haven't read all this time... will try on my computer to see...

Revision history for this message
Best Nicolas DERIVE (kalon33) said :
#5

Ah, I found the problem !!!

It seems to be the same on all ubuntu installations (desktop too), in feisty and in the future gutsy gibbon as well.

$LC_ALL and $LANG variables are never set.

I don't know if they should be really set, of if there are alternatives. If it's a real problem, you should fill in a bug report (or a wishlist one) at https://launchpad.net/ubuntu/+source/langpack-locales/+filebug .

Hope that it helps you.

--kalon33

Revision history for this message
Wladston Viana (wladston) said :
#6

Thanks Nicolas DERIVE, that solved my question.

Revision history for this message
Wladston Viana (wladston) said :
#7

Nicolas,

Oh, Thanks for everything!!

Since I installed the English language, I get no more console errors, so I think it should be fine.

Revision history for this message
David Greaves (david-dgreaves) said :
#8

I'm getting this problem too on 8.10

I have language-pack-en but LC_ALL etc are never set during installation

Revision history for this message
Ashley Kyd (ashkyd) said :
#9

I'd suggest installing language-pack-en instead, as it's not a metapackage for Openoffice etc.

Revision history for this message
Fırat Küçük (firatkucuk) said :
#10

LOCALE names should be the same with /usr/lib/locale directories

you may append to /etc/environment:
  LANG="en_US.utf8"
  LANGUAGE="en_US.utf8"
  LC_ALL="en_US.utf8"