Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
Can you please edit your question and add the output of the locale command. –  Gunnar Hjalmarsson Jun 6 at 22:33
    
locale output added –  machineghost Jun 6 at 23:02
    
how to fix unmet dependencies read here askubuntu.com/questions/140246/… –  JohnnyEnglish Jun 6 at 23:04
    
I think my setup is just foobar; I tried following all the steps in that link but I still have a broken dependency with locales. Guess it's time to upgrade to a more recent distro :-( –  machineghost Jun 9 at 16:39

1 Answer 1

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.