You are not logged in.

#1 2020-03-04 21:04:29

ChingDim
Member
Registered: 2019-07-22
Posts: 42

tmux: invalid LC_ALL, LC_CTYPE or LANG

I have an AWS EC2 instance running Arch Linux. When I installed tmux and tried to launch it from SSH, it prints that message.

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

/etc/locale.conf

LANG=en_US.UTF-8

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

Thanks, any help is appreciated. Also if you need any additional information please let me know smile

Last edited by ChingDim (2020-03-04 21:05:27)

Offline

#2 2020-03-04 21:43:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,721

Offline

#3 2020-03-04 22:57:48

ChingDim
Member
Registered: 2019-07-22
Posts: 42

Re: tmux: invalid LC_ALL, LC_CTYPE or LANG

I tried that before multiple times but obviously that didn't work.

Offline

#4 2020-03-04 23:00:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,721

Re: tmux: invalid LC_ALL, LC_CTYPE or LANG

"locale -a" says there's only POSX and C, so whatever you "tried", you either didn't uncomment the proper (or any) locale or forgot to run locale-gen or ran the latter as regular user or …
Please decribe exactly what you "tried": input, output and the contents of /etc/locale.gen

Offline

#5 2020-03-04 23:20:19

ChingDim
Member
Registered: 2019-07-22
Posts: 42

Re: tmux: invalid LC_ALL, LC_CTYPE or LANG

/etc/locale.gen

en_US.UTF-8 UTF-8

Running locale-gen:

Generating locales...
Generation complete

.

Offline

#6 2020-03-04 23:35:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,721

Re: tmux: invalid LC_ALL, LC_CTYPE or LANG

Please upload the actual /etc/locale.gen somewhere - the default contains every locale commented, so you must have edited a lot.
Maybe there's some byte error (eg. idk. how it'd react to CRLF's) and locale-gen omits all locales (according to that output)

Edit: shooting in all directions, "pacman -Qkk glibc; stat /bin/sh"

Last edited by seth (2020-03-04 23:40:37)

Offline

#7 2020-03-05 19:18:19

ChingDim
Member
Registered: 2019-07-22
Posts: 42

Re: tmux: invalid LC_ALL, LC_CTYPE or LANG

seth wrote:

Please upload the actual /etc/locale.gen somewhere - the default contains every locale commented, so you must have edited a lot.
Maybe there's some byte error (eg. idk. how it'd react to CRLF's) and locale-gen omits all locales (according to that output)

Edit: shooting in all directions, "pacman -Qkk glibc; stat /bin/sh"

I have a /etc/locale.gen.pacnew that contains what I believed to be the actual file: It has tons of locales in #.

[root@ip-172-31-41-227 ~]# pacman -Qkk glibc; stat /bin/sh
backup file: glibc: /etc/locale.gen (Modification time mismatch)
backup file: glibc: /etc/locale.gen (Size mismatch)
glibc: 1576 total files, 0 altered files
  File: /bin/sh -> bash
  Size: 4               Blocks: 0          IO Block: 4096   symbolic link
Device: 10301h/66305d   Inode: 138203      Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-03-05 00:40:19.994830907 +0000
Modify: 2020-02-13 19:41:00.000000000 +0000
Change: 2020-02-18 23:53:19.291007942 +0000
 Birth: 2020-02-18 23:53:19.291007942 +0000

Offline

#8 2020-03-05 19:23:07

ChingDim
Member
Registered: 2019-07-22
Posts: 42

Re: tmux: invalid LC_ALL, LC_CTYPE or LANG

Alright, it seems that using that file and uncommenting en_USUTF-8 actually generates the locale now. I can enter tmux. Thanks for pointing out that mistake!

Offline

#9 2020-03-05 21:38:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,721

Re: tmux: invalid LC_ALL, LC_CTYPE or LANG

Cool.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

If you still have the original file and want an opinion on why it might have failed, feel free to post it (but it must be the actual file, not a copy of its contents)

Offline

Board footer

Powered by FluxBB