[SUPPORT] Locale Settings not found

I have been experiencing this issue for about two months. I have since backed up my files and finally reinstalled my OS today rebooting all past screw ups I might have made, and starting off with a fresh version of Prometheus 8.0 PureOS.

The issue is that there are some repositories I just cannot install by the “Software” app, when I do install them via terminal, I cannot open them. Or their GUI won’t load at least…
This has happened with: Chrome Browser, Mullvad VPN, Etcher, and countless others.

Here is the code output + me attempting fixing it with standard locale-gen command. Bear in mind I have not run any other sudo command, or update/upgrade…

user@user-pc:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  dleyna-renderer folks-common gir1.2-champlain-0.12 gir1.2-geocodeglib-1.0
  gir1.2-gfbgraph-0.2 gir1.2-goa-1.0 gir1.2-gspell-1 gir1.2-gtkchamplain-0.12
  gir1.2-rest-0.7 gnome-online-miners gnome-todo-common libamd2 libbabl-0.1-0
  libcamd2 libccolamd2 libchamplain-0.12-0 libchamplain-gtk-0.12-0 libcholmod3
  libfolks-eds25 libfolks25 libgegl-0.4-0 libgegl-common libgfbgraph-0.2-0
  libgnome-todo libmetis5 libmission-control-plugins0 libraw16 libsdl1.2debian
  libumfpack5 libzapojit-0.0-0 telepathy-idle telepathy-logger
  telepathy-mission-control-5
0 upgraded, 0 newly installed, 33 to remove and 514 not upgraded.
After this operation, 18.7 MB disk space will be freed.
Do you want to continue? [Y/n] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "en_US.UTF-8",
	LC_MONETARY = "en_US.UTF-8",
	LC_ADDRESS = "en_US.UTF-8",
	LC_TELEPHONE = "en_US.UTF-8",
	LC_NAME = "en_US.UTF-8",
	LC_MEASUREMENT = "en_US.UTF-8",
	LC_IDENTIFICATION = "en_US.UTF-8",
	LC_NUMERIC = "en_US.UTF-8",
	LC_PAPER = "en_US.UTF-8",
	LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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
(Reading database ... 200569 files and directories currently installed.)
Removing dleyna-renderer (0.4.0-1+b1) ...
Removing libfolks-eds25:amd64 (0.11.4-1+b2) ...
Removing libfolks25:amd64 (0.11.4-1+b2) ...
Removing folks-common (0.11.4-1) ...
Removing gir1.2-gtkchamplain-0.12:amd64 (0.12.16-2) ...
Removing gir1.2-champlain-0.12:amd64 (0.12.16-2) ...
Removing gir1.2-geocodeglib-1.0:amd64 (3.25.4.1-4) ...
Removing gir1.2-gfbgraph-0.2:amd64 (0.2.3-2) ...
Removing gir1.2-goa-1.0:amd64 (3.28.0-1) ...
Removing gir1.2-gspell-1:amd64 (1.6.1-1) ...
Removing gir1.2-rest-0.7 (0.8.0-2) ...
Removing gnome-online-miners (3.26.0-3) ...
Removing gnome-todo-common (3.28.1-1) ...
Removing libgegl-0.4-0:amd64 (0.4.0-1) ...
Removing libumfpack5:amd64 (1:5.2.0+dfsg-1) ...
Removing libcholmod3:amd64 (1:5.2.0+dfsg-1) ...
Removing libamd2:amd64 (1:5.2.0+dfsg-1) ...
Removing libbabl-0.1-0:amd64 (0.1.46-3) ...
Removing libcamd2:amd64 (1:5.2.0+dfsg-1) ...
Removing libccolamd2:amd64 (1:5.2.0+dfsg-1) ...
Removing libchamplain-gtk-0.12-0:amd64 (0.12.16-2) ...
Removing libchamplain-0.12-0:amd64 (0.12.16-2) ...
Removing libgegl-common (0.4.0-1) ...
Removing libgfbgraph-0.2-0:amd64 (0.2.3-2) ...
Removing libgnome-todo (3.28.1-1) ...
Removing libmetis5:amd64 (5.1.0.dfsg-5+b2) ...
Removing telepathy-mission-control-5 (1:5.16.4-2) ...
Removing libmission-control-plugins0:amd64 (1:5.16.4-2) ...
Removing libraw16:amd64 (0.18.8-2) ...
Removing libsdl1.2debian:amd64 (1.2.15+dfsg2-0.1) ...
Removing libzapojit-0.0-0:amd64 (0.0.3-4) ...
Removing telepathy-idle (0.2.0-2+b1) ...
Removing telepathy-logger (0.8.2-3) ...
Processing triggers for libglib2.0-0:amd64 (2.56.1-2) ...
Processing triggers for libc-bin (2.27-3) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
user@user-pc:~$ 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
LANGUAGE=
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=
user@user-pc:~$ sudo locale-gen "en_US.UTF-8"
Generating locales (this might take a while)...
Generation complete.
user@user-pc:~$ sudo dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_MEASUREMENT = "en_US.UTF-8",
	LC_PAPER = "en_US.UTF-8",
	LC_MONETARY = "en_US.UTF-8",
	LC_NAME = "en_US.UTF-8",
	LC_ADDRESS = "en_US.UTF-8",
	LC_NUMERIC = "en_US.UTF-8",
	LC_TELEPHONE = "en_US.UTF-8",
	LC_IDENTIFICATION = "en_US.UTF-8",
	LC_TIME = "en_US.UTF-8",
	LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "en_US.UTF-8",
	LC_MONETARY = "en_US.UTF-8",
	LC_ADDRESS = "en_US.UTF-8",
	LC_TELEPHONE = "en_US.UTF-8",
	LC_NAME = "en_US.UTF-8",
	LC_MEASUREMENT = "en_US.UTF-8",
	LC_IDENTIFICATION = "en_US.UTF-8",
	LC_NUMERIC = "en_US.UTF-8",
	LC_PAPER = "en_US.UTF-8",
	LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "en_US.UTF-8",
	LC_MONETARY = "en_US.UTF-8",
	LC_ADDRESS = "en_US.UTF-8",
	LC_TELEPHONE = "en_US.UTF-8",
	LC_NAME = "en_US.UTF-8",
	LC_MEASUREMENT = "en_US.UTF-8",
	LC_IDENTIFICATION = "en_US.UTF-8",
	LC_NUMERIC = "en_US.UTF-8",
	LC_PAPER = "en_US.UTF-8",
	LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
*** update-locale: Error: invalid locale settings:  LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 LANG=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8

PS.
I am running a Librem 12 v2 - it’s a local machine, most of the known solutions are for remote servers…
I have no problem rebooting my machine from scratch, I’ll refrain from making any changes to my computer / installing any new software until I can fix this locale settings issue… So please hurry! :slight_smile:

The above command ignores any parameters supplied to it, and proceeds to geerate no locales.

This is more like it, but it misses something. When I run dpkg-reconfigure locales, i get dialog with a list of locales, from which I can choose which ones to generate, and then which one to make a default. Then the output looks like this on my system:

root@ayers:/# dpkg-reconfigure locales
Generating locales (this might take a while)...
en_US.UTF-8... done
ja_JP.UTF-8... done
pl_PL.UTF-8... done
ru_RU.UTF-8... done
done
Generation complete.

If you don’t get to choose which locales to generate when you run dpkg-reconfigure locales then, for immediate solution, edit file /etc/locale.gen and uncoment line saying en_US.UTF-8, then run locale-gen.

(All commands run as root, so prepend sudo to them)

You’re right, I forgot to mention the selection page. I tried multiple times to select “All” But got

user@user-pc:~$ sudo dpkg-reconfigure locales
[sudo] password for user: 
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_MEASUREMENT = "en_US.UTF-8",
	LC_PAPER = "en_US.UTF-8",
	LC_MONETARY = "en_US.UTF-8",
	LC_NAME = "en_US.UTF-8",
	LC_ADDRESS = "en_US.UTF-8",
	LC_NUMERIC = "en_US.UTF-8",
	LC_TELEPHONE = "en_US.UTF-8",
	LC_IDENTIFICATION = "en_US.UTF-8",
	LC_TIME = "en_US.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "en_US.UTF-8",
	LC_MONETARY = "en_US.UTF-8",
	LC_ADDRESS = "en_US.UTF-8",
	LC_TELEPHONE = "en_US.UTF-8",
	LC_NAME = "en_US.UTF-8",
	LC_MEASUREMENT = "en_US.UTF-8",
	LC_IDENTIFICATION = "en_US.UTF-8",
	LC_NUMERIC = "en_US.UTF-8",
	LC_PAPER = "en_US.UTF-8",
	LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

When I instead scroll down to en_US.UTF-8 and select that, I get the following:

user@user-pc:~$ sudo dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_MEASUREMENT = "en_US.UTF-8",
	LC_PAPER = "en_US.UTF-8",
	LC_MONETARY = "en_US.UTF-8",
	LC_NAME = "en_US.UTF-8",
	LC_ADDRESS = "en_US.UTF-8",
	LC_NUMERIC = "en_US.UTF-8",
	LC_TELEPHONE = "en_US.UTF-8",
	LC_IDENTIFICATION = "en_US.UTF-8",
	LC_TIME = "en_US.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "en_US.UTF-8",
	LC_MONETARY = "en_US.UTF-8",
	LC_ADDRESS = "en_US.UTF-8",
	LC_TELEPHONE = "en_US.UTF-8",
	LC_NAME = "en_US.UTF-8",
	LC_MEASUREMENT = "en_US.UTF-8",
	LC_IDENTIFICATION = "en_US.UTF-8",
	LC_NUMERIC = "en_US.UTF-8",
	LC_PAPER = "en_US.UTF-8",
	LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Edit: I have now uncommented the line on /etc/locale.gen I will reboot and update this thread.
Edit: Which locale should I be putting as default? It currently is en_US.UTF-8 but I was wondering if it should be something different, perhaps a more global language set? There’s a (something)-C option that was on the top of the selection list once I selected all locales for generation.

uncomemmented locale in /etc/locale.gen - check
run locale-gen - missing!
Won’t work!