Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 993  / 2 Years ago, fri, april 15, 2022, 11:24:30

Whenever I try to run the programming tool meld I get the following error:



Traceback (most recent call last):
File "/usr/bin/meld", line 75, in <module>
locale.setlocale(locale.LC_ALL,'')
File "/usr/lib/python2.7/locale.py", line 540, in setlocale
return _setlocale(category, locale)


From what I've read it appears my locale settings are off, and indeed when I run locale -a I get:



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
C.UTF-8
POSIX


Similarly when I run plain old locale I get:



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=


The problem is, when I try to fix that with a sudo apt-get install language-pack-en-base I get:



The following packages have unmet dependencies:
language-pack-en-base : Depends: locales (>= 2.3.6) but it is not going to be installed


and when I try sudo apt-get install locales I get:



The following packages have unmet dependencies:
libc6 : Breaks: locales (< 2.18) but 2.13+git20110622-2 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.


If I instead try the same thing inside Synaptic I see that installing locales would uninstall seemingly every package in my system (including apt)!



I thought that perhaps my sources were screwed up so I took out everything except the core "old-releases.ubuntu.com" ones, reloaded, and tried again, but that didn't help.



So, can anyone please help explain to me how I can either:



A) fix meld without messing around with all this locale stuff?



or



B) get language-pack-en-base to install without taking out the rest of my packages?


More From » locale

 Answers
5

Your problem is that the LANG environment variable is set to en_US.UTF-8 while no locale with that name has been generated. Fix it by running:



sudo locale-gen en_US.UTF-8

[#24769] Friday, April 15, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
egantfis

Total Points: 406
Total Questions: 108
Total Answers: 108

Location: Austria
Member since Thu, Jan 7, 2021
3 Years ago
egantfis questions
Mon, Nov 1, 21, 03:37, 3 Years ago
Fri, Mar 18, 22, 23:26, 2 Years ago
Mon, Mar 6, 23, 05:03, 1 Year ago
Sun, Oct 3, 21, 23:30, 3 Years ago
Thu, Mar 10, 22, 12:28, 2 Years ago
;