You are not logged in.

#1 2007-09-01 10:51:21

ruscook
Member
From: Sydney Australia
Registered: 2007-08-27
Posts: 105
Website

[Fixed] - Locale Errors - [Fixed]

I must be missing something as I've tried some of the locale fixes here but still get the error below from pacman:
          warning: current locale is invalid; using default "C" locale

Output from locale command

locale
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
LANG=en_AU.UTF-8
LC_CTYPE="en_AU.iso8859"
LC_NUMERIC="en_AU.iso8859"
LC_TIME="en_AU.iso8859"
LC_COLLATE="en_AU.iso8859"
LC_MONETARY="en_AU.iso8859"
LC_MESSAGES="en_AU.iso8859"
LC_PAPER="en_AU.iso8859"
LC_NAME="en_AU.iso8859"
LC_ADDRESS="en_AU.iso8859"
LC_TELEPHONE="en_AU.iso8859"
LC_MEASUREMENT="en_AU.iso8859"
LC_IDENTIFICATION="en_AU.iso8859"
LC_ALL=en_AU.iso8859

/etc/rc.conf snippet

 -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_AU.UTF-8"
HARDWARECLOCK="localtime"
TIMEZONE="Australia/Sydney"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

/etc/locale.gen snippet

en_US ISO-8859-1
en_US.UTF-8 UTF-8
en_AU.UTF-8    UTF-8
en_AU    ISO-8859-1

Can someone let me know what silly error I'm making smile

Thanks

Last edited by ruscook (2008-01-19 05:40:00)

Offline

#2 2007-09-01 11:19:40

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [Fixed] - Locale Errors - [Fixed]

Did you run locale-gen?

Offline

#3 2007-09-02 09:14:35

ruscook
Member
From: Sydney Australia
Registered: 2007-08-27
Posts: 105
Website

Re: [Fixed] - Locale Errors - [Fixed]

Sure did lucke as root as well.

Russ

Offline

#4 2007-09-02 19:38:25

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: [Fixed] - Locale Errors - [Fixed]

I'm no locale expert, since I'm on a hicalerie diet, but I was having the same problems until...

An strace on locale revealed the /usr/lib/locale path was empty.  After I uncommented my locale (en_US.rtf8) in /etc/locale.gen, reran locale-gen as root, a /usr/lib/locale/local-archive sprang forth from the depths and bowels of /dev/null.  I do not get those errors anymore, nor does strace show any missing paths, nor do I have any clue what I just did.  But it worked!

Offline

#5 2007-09-03 11:49:27

ruscook
Member
From: Sydney Australia
Registered: 2007-08-27
Posts: 105
Website

Re: [Fixed] - Locale Errors - [Fixed]

Thanks I have a /usr/lib/locale/locale-archive so it can't be that. sad

Offline

#6 2007-09-03 11:59:22

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: [Fixed] - Locale Errors - [Fixed]

No error-messages when running locale-gen?


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#7 2007-09-03 20:32:35

ruscook
Member
From: Sydney Australia
Registered: 2007-08-27
Posts: 105
Website

Re: [Fixed] - Locale Errors - [Fixed]

Nope sad

 locale-gen
Generating locales...
  en_US.ISO-8859-1... done
  en_US.UTF-8... done
  en_AU.UTF-8... done
  en_AU.ISO-8859-1... done
Generation complete.
 pacman -Ss fred
warning: current locale is invalid; using default "C" locale

Offline

#8 2007-09-03 22:58:38

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: [Fixed] - Locale Errors - [Fixed]

What does "strace -eopen locale" return?

Offline

#9 2007-09-04 06:23:42

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: [Fixed] - Locale Errors - [Fixed]

What's the output of `locale -a`. Probably you're using a wrong name for your locales.


Hail to the thief!

Offline

#10 2007-09-04 08:55:49

ruscook
Member
From: Sydney Australia
Registered: 2007-08-27
Posts: 105
Website

Re: [Fixed] - Locale Errors - [Fixed]

No difference if done as me or root.

locale -a
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_COLLATE to default locale: No such file or directory
C
POSIX
en_AU
en_AU.iso88591
en_AU.utf8
en_US
en_US.iso88591
en_US.utf8
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libc.so.6", O_RDONLY)        = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
open("/usr/lib/locale/en_AU.iso8859/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_AU/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.iso8859/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
locale: Cannot set LC_CTYPE to default locale: No such file or directory
open("/usr/lib/locale/en_AU.iso8859/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_AU/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.iso8859/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
open("/usr/lib/locale/en_AU.iso8859/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_AU/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.iso8859/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_AU.UTF-8
LC_CTYPE="en_AU.iso8859"
LC_NUMERIC="en_AU.iso8859"
LC_TIME="en_AU.iso8859"
LC_COLLATE="en_AU.iso8859"
LC_MONETARY="en_AU.iso8859"
LC_MESSAGES="en_AU.iso8859"
LC_PAPER="en_AU.iso8859"
LC_NAME="en_AU.iso8859"
LC_ADDRESS="en_AU.iso8859"
LC_TELEPHONE="en_AU.iso8859"
LC_MEASUREMENT="en_AU.iso8859"
LC_IDENTIFICATION="en_AU.iso8859"
LC_ALL=en_AU.iso8859

Thanks Russ

Offline

#11 2007-09-04 11:05:23

Gruntz
Member
From: Haskovo, Bulgaria
Registered: 2007-08-31
Posts: 291

Re: [Fixed] - Locale Errors - [Fixed]

Hello.

I have the same problem with locale settings as ruscook. I have installed my system as "basic", and the added the other software. Is there the problem. Should I install something else, to solve the problem.

Regards.

Offline

#12 2007-09-04 11:39:16

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: [Fixed] - Locale Errors - [Fixed]

you have LANG set as

LANG=en_AU.UTF-8

try it with

LANG=en_AU.utf8

it's probably located in /etc/rc.conf

Last edited by klixon (2007-09-04 11:39:52)


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#13 2007-09-04 11:56:13

ruscook
Member
From: Sydney Australia
Registered: 2007-08-27
Posts: 105
Website

Re: [Fixed] - Locale Errors - [Fixed]

klixon, that didn't fix it but it put me on the right track and I changed .bashrc to include
export LC_LANG=en_AU.utf8
export LC_CTYPE="en_AU.utf8"
export LC_ALL=en_AU.utf8

And now no Pacman error in my shell or a sudo -i root shell.

Thanks for pointing me in the right direction...

To me it means locale-gen has an error. Why go to the trouble to setup locale-gen, rc.conf and run locale-gen if you need to explicitly put the correct variables in a shell startup script.

Russ

Offline

#14 2007-09-04 12:02:48

ruscook
Member
From: Sydney Australia
Registered: 2007-08-27
Posts: 105
Website

Re: [Fixed] - Locale Errors - [Fixed]

Can a mod please change the title to add [FIXED] now for others?

Thanks
Russ

Offline

#15 2007-09-04 12:41:32

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: [Fixed] - Locale Errors - [Fixed]

The Wiki points this out in the Troubleshooting section, as well as it explains why certain steps are required (locale-gen, rc.conf, etc.).


Hail to the thief!

Offline

#16 2007-09-04 20:58:29

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: [Fixed] - Locale Errors - [Fixed]

ruscook wrote:

To me it means locale-gen has an error. Why go to the trouble to setup locale-gen, rc.conf and run locale-gen if you need to explicitly put the correct variables in a shell startup script.

This should normally not be necessary. Just configuring locale.gen en rc.conf and running locale-gen should be enough.
There might be other places where those variables are set though...
/etc/profile comes to mind or /etc/profile.d/*. These files are sourced every time you log in, so you might want to have a look-see there


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#17 2007-09-05 08:45:51

ruscook
Member
From: Sydney Australia
Registered: 2007-08-27
Posts: 105
Website

Re: [Fixed] - Locale Errors - [Fixed]

harlekin wrote:

The Wiki points this out in the Troubleshooting section, as well as it explains why certain steps are required (locale-gen, rc.conf, etc.).

Obviously I didn't find this in the wiki when I looked, I'll have a re-read.
..... nope couldn't see a troubleshooting section on the wiki front page, in the faq nor in the installation guide.

Where is it?

Russ

Last edited by ruscook (2007-09-05 08:48:34)

Offline

#18 2007-09-05 09:07:23

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: [Fixed] - Locale Errors - [Fixed]

Say you define your system-wide language as en_US.utf. Now I live in the netherlands, so some user might want their programs to run with the dutch language. Also, I want al measurement, date and time formats etc in dutch format.

I'd have to uncomment both en_US.utf8 and nl_NL.utf8 in /etc/locale.gen and compile them using locale-gen.
I then set LANG or whatever in /etc/rc.conf to nl_NL.utf8 (system-wide setting)
I then echo "export LC_MESSAGES=en_US.utf8" > /etc/profile.d/language.sh && chmod a+x /etc/profile.d/language.sh (system-wide language is english)
A user that wants dutch language can then echo "export LC_MESSAGES=nl_NL.utf8" >> ~/.bashrc

It's all about creating choice


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#19 2007-09-05 14:40:54

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: [Fixed] - Locale Errors - [Fixed]

ruscook wrote:

Where is it?

Have you checked his article? http://wiki.archlinux.org/index.php/Configuring_locales


Hail to the thief!

Offline

#20 2008-01-19 03:31:50

underpenguin
Member
Registered: 2007-02-01
Posts: 116

Re: [Fixed] - Locale Errors - [Fixed]

ruscook wrote:

Can a mod please change the title to add [FIXED] now for others?

Thanks
Russ

If you just edit your first post you can change the subject.

Offline

#21 2008-01-19 05:40:34

ruscook
Member
From: Sydney Australia
Registered: 2007-08-27
Posts: 105
Website

Re: [Fixed] - Locale Errors - [Fixed]

Done - ta

Offline

Board footer

Powered by FluxBB