1

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?

4
  • Can you please edit your question and add the output of the locale command. Jun 6, 2014 at 22:33
  • locale output added Jun 6, 2014 at 23:02
  • how to fix unmet dependencies read here askubuntu.com/questions/140246/…
    – JoKeR
    Jun 6, 2014 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 :-( Jun 9, 2014 at 16:39

2 Answers 2

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
1

I've solved this problem exporting LC_ALL with my language set definition. For US English UTF-8 do:

$ export LC_ALL="en_US.UTF-8"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .