You are not logged in.

#1 2007-05-08 15:22:08

ujjwal
Member
Registered: 2006-01-31
Posts: 27

locale warnings [solved]

Pacman (3.03) and some applications give this warning -

warning: current locale is invalid; using default "C" locale

Running "locale -a" shows this

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
C
POSIX

While there are no problems as yet, I would really like to fix the issue, could anyone help me out?

Thanks,

Last edited by ujjwal (2007-05-12 04:46:42)

Offline

#2 2007-05-08 19:53:09

japetto
Member
From: Chicago, IL US
Registered: 2006-07-02
Posts: 183

Re: locale warnings [solved]

Stupid question, but have you already set your locale in /etc/locale.gen, and ran

locale-gen

?

Offline

#3 2007-05-08 21:32:54

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: locale warnings [solved]


1000

Offline

#4 2007-05-12 04:46:29

ujjwal
Member
Registered: 2006-01-31
Posts: 27

Re: locale warnings [solved]

Ok, I hadn't edited locale.gen, and so everything was commented out. Uncommented en_us.utf8 and things work fine now smile thanks a lot for your help.

Offline

#5 2007-05-13 22:23:26

ahaslam
Member
Registered: 2007-05-11
Posts: 119

Re: locale warnings [solved]

Following the wiki: http://wiki.archlinux.org/index.php/Locale

I had nothing in: /etc/locale.gen
So I entered:

en_GB.UTF-8     UTF-8

Then ran locale-gen:

[root@voodoo ahaslam]# locale-gen
Generating locales...
Generation complete.

Running locale -a gave:

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
C
POSIX

So:

[root@voodoo ahaslam]# stat /usr/share/i18n/locales/en_GB
  File: `/usr/share/i18n/locales/en_GB'
  Size: 5334            Blocks: 16         IO Block: 4096   regular file
Device: 804h/2052d      Inode: 335545864   Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2007-05-13 22:54:51.385256465 -0700
Modify: 2007-04-08 12:36:12.000000000 -0700
Change: 2007-05-09 18:34:35.940984187 -0700

en_GB.UTF-8 is set in /etc/rc.conf

Any ideas?


- ADDITIONAL COMMENT: FIXED -
I was kindly advised by Neverther on IRC to remove /etc/locale.gen before reinstalling glibc & I'm glad to report that it worked perfectly, thanks again.

smile

Last edited by ahaslam (2007-05-14 16:35:22)

Offline

#6 2007-05-27 20:55:24

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: locale warnings [solved]

- ADDITIONAL COMMENT: FIXED -
I was kindly advised by Neverther on IRC to remove /etc/locale.gen before reinstalling glibc & I'm glad to report that it worked perfectly, thanks again.

smile

I'm getting the same problem, can you expand on your solution? Do you mean remove the file then do a pacman -S glibc?

Offline

#7 2007-05-28 07:42:23

ahaslam
Member
Registered: 2007-05-11
Posts: 119

Re: locale warnings [solved]

Yes, that's correct.

Offline

#8 2007-06-19 12:47:53

flebber
Member
Registered: 2007-06-19
Posts: 32

Re: locale warnings [solved]

That hasn't worked for me. I removed /etc/locale.gen and then pacman -S glibc. the output advised that glibc no longer used for locales and that I should /usr/sbin/locale-gen    which I have done but still receive the error.

Offline

#9 2007-06-19 16:31:02

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: locale warnings [solved]

I didn't re-install glibc but mine seems to be working ok now. I don't remember when it started working of if I did anything.

Sorry to be vague about it but I noticed when it wasn't working but then stopped noticing when it started working!

If you want a copy of any of the files let me know.

Offline

#10 2007-07-20 21:25:07

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: locale warnings [solved]

I've got this in mine on my desktop and all is working ok

export LANG=en_GB

I've just got to get round to putting it all on my laptop!

Offline

Board footer

Powered by FluxBB