You are not logged in.

#1 2021-10-27 17:09:52

IsItWashable
Member
Registered: 2021-10-12
Posts: 64

[SOLVED] Locale-gen showing errors

Currently trying to set up Neovim.

When running :checkhealth on Neovim I get the error "Locale does not support UTF-8"

After going through forums and tutorials on how to configure locale to set up UTF-8 I run into a few errors. Just wondering if anyone has any ideas on how to fix this. Any help greatly appreciated!

This is after running locale-gen .


/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_UK.UTF-8)
rm: cannot remove '/usr/lib/locale/locale-archive': Permission denied
Generating locales...
  en_GB.UTF-8...cannot open locale archive "/usr/lib/locale/locale-archive": Permission denied

Last edited by IsItWashable (2021-10-28 12:14:40)

Offline

#2 2021-10-27 17:10:57

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Locale-gen showing errors

You have to run it as root

Offline

#3 2021-10-27 17:13:12

IsItWashable
Member
Registered: 2021-10-12
Posts: 64

Re: [SOLVED] Locale-gen showing errors

Yep still getting an error

/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_UK.UTF-8)
Generating locales...
  en_GB.UTF-8... done
  en_US.UTF-8... done
Generation complete.

Neovim still showing ERROR: Locale does not support UTF-8

Offline

#4 2021-10-27 17:15:42

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Locale-gen showing errors

Because you didn't set a locale that you generated. Stop using LC_ALL, though. Read the wiki about setting up locales.

Offline

#5 2021-10-27 17:41:35

IsItWashable
Member
Registered: 2021-10-12
Posts: 64

Re: [SOLVED] Locale-gen showing errors

I already went through the wiki.
Just done everything again and Neovim still showing the same error

Running locale shows

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

Offline

#6 2021-10-27 17:44:59

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Locale-gen showing errors

Because en_UK.UTF-8 doesn't exist at all. There's no such thing. And you're still setting LC_ALL, which you shouldn't be.

As the wiki says, you set LANG to one of the locales that you generated.

Offline

#7 2021-10-27 18:04:49

IsItWashable
Member
Registered: 2021-10-12
Posts: 64

Re: [SOLVED] Locale-gen showing errors

How can i turn off LC_ALL?

I have set locale to LANG=en_GB.utf8 but its still showing UK

Offline

#8 2021-10-27 18:09:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,300

Re: [SOLVED] Locale-gen showing errors

What's your general environment? E.g. Plasma has a config that might lead to some deviations in this space that you can correct in ~/.config/plasma-localerc or in the relevant localisation KCM in system settings

Offline

#9 2021-10-27 18:09:29

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

Re: [SOLVED] Locale-gen showing errors

1. That's still not entirely correct (*.UTF-8)
2. You've set that where? What did you do to apply that change?
3. Do you set locales in other locations (shell rc)? Where did/do you set LC_ALL?

Online

#10 2021-10-27 18:21:02

IsItWashable
Member
Registered: 2021-10-12
Posts: 64

Re: [SOLVED] Locale-gen showing errors

I am running i3

1. Yes i know, I wrote it correctly in the config.
2. in /etc/locale.conf I wrote

LANG="en_GB.UTF-8"
LC_CTYPE="en_GB.UTF-8"

3. I am not sure where LC_ALL is set to be honest. I just followed the wiki (generated and set the system locale).

Offline

#11 2021-10-27 18:23:21

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

Re: [SOLVED] Locale-gen showing errors

grep -r LC_ALL ~/.bash* ~/.xinitrc ~/.*profile /etc/profile* # assuming you're using bash

Online

#12 2021-10-27 18:28:36

IsItWashable
Member
Registered: 2021-10-12
Posts: 64

Re: [SOLVED] Locale-gen showing errors

I am using zsh. Installed it and set it as my default yesterday.

Offline

#13 2021-10-27 18:30:17

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

Re: [SOLVED] Locale-gen showing errors

Well then replace the "bash" w/ "zsh".
Did you also install OMZ?
Oh, and in doubt reboot to clear the system from any transient nonsense you might have performed in order to deal w/ your locale issues.

Online

#14 2021-10-27 18:30:30

IsItWashable
Member
Registered: 2021-10-12
Posts: 64

Re: [SOLVED] Locale-gen showing errors

I also only have an etc/profile.d, I don't have etc/profile.
Yes i installed OMZ

Last edited by IsItWashable (2021-10-27 18:31:03)

Offline

#15 2021-10-27 18:31:26

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

Re: [SOLVED] Locale-gen showing errors

Which is why there's an "-r" and an "*" …

Online

#16 2021-10-27 18:39:01

IsItWashable
Member
Registered: 2021-10-12
Posts: 64

Re: [SOLVED] Locale-gen showing errors

Still not working. Running locale shows

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

Offline

#17 2021-10-27 18:40:46

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

Re: [SOLVED] Locale-gen showing errors

We're still waiting forthe grep results…

Also please use code tags, https://bbs.archlinux.org/help.php#bbcode

Online

#18 2021-10-27 18:47:07

IsItWashable
Member
Registered: 2021-10-12
Posts: 64

Re: [SOLVED] Locale-gen showing errors

 archbtw% grep -r LC_ALL ~/.zsh* ~/.xinitrc ~/.*profile /etc/profile*
/home/liam/.zsh_history:: 1635359491:0;grep -r LC_ALL ~/.zsh* ~/.xinitrc ~/.*profile /etc/profile*
/home/liam/.zsh_history:: 1635359675:0;grep -r LC_ALL ~/.zsh ~/.xinitrc ~/.profile.d /etc/profile.d
/home/liam/.zsh_history:: 1635359755:0;grep -r LC_ALL ~/.zshrc* ~/.xinitrc ~/.*profile /etc/profile
/home/liam/.zsh_history:: 1635359880:0;grep -r LC_ALL ~/.zshrc ~/.xinitrc ~/.profile.d /etc/profile.d
/home/liam/.zsh_history:: 1635360321:0;grep -r LC_ALL ~/.zsh* ~/.xinitrc ~/.*profile /etc/profile*
/home/liam/.zshrc:export LC_ALL=en_UK.UTF-8 

Offline

#19 2021-10-27 18:50:31

IsItWashable
Member
Registered: 2021-10-12
Posts: 64

Re: [SOLVED] Locale-gen showing errors

Lol. Don't worry i see my mistake. Fixed it now!
Thank you for your help, was a silly mistake.

Offline

#20 2021-10-27 22:39:56

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Locale-gen showing errors

Please remember to mark your thread [SOLVED] (edit the title of your first post).

Offline

Board footer

Powered by FluxBB