You are not logged in.

#1 2014-01-11 10:03:57

Marvix
Member
Registered: 2013-10-08
Posts: 146

[SOLVED] Missing locale definition file

When I enabled a locale, which was needed for a software, in /etc/locale.gen, on my rush I erased the default of my system the en_US.UTF-8 UTF-8 and saved the changes. I generated the locales with locale-gen and an error message was shown

cannot open locale definition file `en_US.UTF-8': No such file or directory

I've repaired the missing locale, writing it where it was and tried to generate again, but the error message continues to appear.

How can I repair it?

locale-a gives me the above.

C
POSIX
el_GR
el_GR.iso88597
el_GR.utf8
en_GB.utf8
en_US
en_US.iso88591
greek

Last edited by Marvix (2014-02-23 21:14:38)

Offline

#2 2014-01-11 10:43:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Missing locale definition file

Either change your settings from en_US.UTF-8 to any of the locales from 'locale -a' e.g. en_GB.utf8 or uncomment en_US.UTF-8 and regenerate locale.gen.

Offline

#3 2014-01-11 11:15:50

Marvix
Member
Registered: 2013-10-08
Posts: 146

Re: [SOLVED] Missing locale definition file

The error message is

Generating locales...
  el_GR.UTF-8
  el_GR.ISO-8859-7
  en_GB.UTF-8
  en_US.UTF-8
cannot open locale definition file `en_US.UTF-8': No such file or directory
  en_US.ISO-8859-1

This is shown every time I regenerate with the command locale-gen


the en_US.UTF-8 is already uncommented. I will try to turn my whole system in to use the en_GB locale.

What other settings should I look?

Offline

#4 2014-01-11 11:44:28

Neburski
Member
Registered: 2009-09-15
Posts: 118

Re: [SOLVED] Missing locale definition file

Marvix wrote:

on my rush I erased the default of my system the en_US.UTF-8 UTF-8 and saved the changes.

cannot open locale definition file `en_US.UTF-8': No such file or directory

Can you be clear about what you mean with erased the default. Did you delete the line en_US.UTF-8 UTF-8 from /etc/locale.gen or /etc/locale.conf or did you delete the folder in /usr/share/X11/locale/ ?
Hopefully you didn't delete the folder (there shouldn't be a reason for you do mess about in that folder anyway).
Can you post the uncommented lines from your /etc/locale.gen and /etc/locale.conf ?

Offline

#5 2014-01-11 12:33:04

Marvix
Member
Registered: 2013-10-08
Posts: 146

Re: [SOLVED] Missing locale definition file

I erased the line, in the /etc/locale.gen, en_US.UTF-8 UTF-8, didn't realize what I didn't, saved the changes I made, along with the needed locale I wanted enable and generated the locale with locale-gen. Then the error message appears and edited again the locale, this time to add the erased en_US.UTF-8 UTF-8. When I generated again, having the belief this 'd repair the fault, I got the error every time I generate.

My /etc/locale.gen is

#dv_MV UTF-8
#dz_BT UTF-8

el_GR.UTF-8 UTF-8
el_GR ISO-8859-7

#el_CY.UTF-8 UTF-8
#el_CY ISO-8859-7
#en_AG UTF-8
#en_AU.UTF-8 UTF-8
#en_AU ISO-8859-1
#en_BW.UTF-8 UTF-8
#en_BW ISO-8859-1
#en_CA.UTF-8 UTF-8
#en_CA ISO-8859-1
#en_DK.UTF-8 UTF-8
#en_DK ISO-8859-1

en_GB.UTF-8 UTF-8

#en_GB ISO-8859-1
#en_HK.UTF-8 UTF-8
#en_HK ISO-8859-1
#en_IE.UTF-8 UTF-8
#en_IE ISO-8859-1
#en_IE@euro ISO-8859-15
#en_IN UTF-8
#en_NG UTF-8
#en_NZ.UTF-8 UTF-8
#en_NZ ISO-8859-1
#en_PH.UTF-8 UTF-8
#en_PH ISO-8859-1
#en_SG.UTF-8 UTF-8
#en_SG ISO-8859-1

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

#en_ZA.UTF-8 UTF-8
#en_ZA ISO-8859-1

There are other uncommitted locales before and after them. For saving space I posted this way.

and the /etc/locale.conf is

LANG=en_GB.UTF-8

I changed the default language of my arch to en_GB.

My  /usr/share/X11/locale/ folder is empty, I don't remember deleting it.

Offline

#6 2014-01-11 13:19:24

Neburski
Member
Registered: 2009-09-15
Posts: 118

Re: [SOLVED] Missing locale definition file

I don't see any issues with your config files, you could try to manually try to rewrite the en_US.UTF-8 to ensure that there isn't some weird hidden character somewhere (I've had it a couple of times in the past, but only on the command line).

Marvix wrote:

My  /usr/share/X11/locale/ folder is empty, I don't remember deleting it.

Weird, but that might not be related to the issue. I simply searched my pc for en_US.UTF-8 and found files at that location.
You system might be setup differently than mine such that you have nothing in that folder.

Do you have anything in the folder /usr/share/locale/ ? Can you see a folder en_US in there?
When you try to regenerate you locale can you check

journalctl -f

afterwards to see if there is any helpful message?

Last edited by Neburski (2014-01-11 13:20:58)

Offline

#7 2014-01-11 13:53:57

Marvix
Member
Registered: 2013-10-08
Posts: 146

Re: [SOLVED] Missing locale definition file

I've tried many times to manually write the en_US.UTF-8 and I get the same error.

With ls /usr/share/locale/ shows that there is en_US.  Sorry for my mistake before about /usr/share/locale/, I checked it as a file with nano, it has en_US.UTF-8.


My journalctl -f

Jan 11 10:56:18 marvix systemd[414]: Reached target Default.
Jan 11 10:56:18 marvix systemd[414]: Startup finished in 266ms.
Jan 11 13:56:40 marvix polkit-agent-helper-1[2497]: pam_unix(polkit-1:auth): ...
Jan 11 13:56:57 marvix systemd[414]: Stopping Default.
-- Reboot --
Jan 11 13:58:01 marvix systemd[544]: Failed to open private bus connection:...ry
Jan 11 13:58:01 marvix systemd[544]: Mounted /sys/kernel/config.
Jan 11 13:58:01 marvix systemd[544]: Stopped target Sound Card.
Jan 11 13:58:01 marvix systemd[544]: Starting Default.
Jan 11 13:58:01 marvix systemd[544]: Reached target Default.
Jan 11 13:58:01 marvix systemd[544]: Startup finished in 183ms

Offline

#8 2014-02-22 22:42:03

Marvix
Member
Registered: 2013-10-08
Posts: 146

Re: [SOLVED] Missing locale definition file

Is there a way to reinstall the locales or repair them. I can't run applications and It is getting worse since I can't use the system in many things.

Offline

#9 2014-02-23 00:35:46

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: [SOLVED] Missing locale definition file

Reinstall glibc.  That will give you the default files (at least as a .pacnew)

Offline

#10 2014-02-23 08:20:23

Marvix
Member
Registered: 2013-10-08
Posts: 146

Re: [SOLVED] Missing locale definition file

Allan wrote:

Reinstall glibc.  That will give you the default files (at least as a .pacnew)

I already did it before and again after this post and I still can't locale-gen giving me the known error.

Any other thoughts to try are always appreciated and welcomed.

Last edited by Marvix (2014-02-23 08:20:52)

Offline

#11 2014-02-23 21:14:12

Marvix
Member
Registered: 2013-10-08
Posts: 146

Re: [SOLVED] Missing locale definition file

After a little marathon of much effort to help me, from the IRC channel archlinux-newbies, finally we got it solved. The solution came with the removal of the file /usr/share/i18n/locales/en_US.UTF-8. After this I generated again the locales with success this time and I was back again to use the software I needed.

Thank for you time and also the people to the IRC channel.

Last edited by Marvix (2014-03-02 23:02:47)

Offline

Board footer

Powered by FluxBB