I tried to install nodejs and npm packages on my VDS with Debian Wheezy. But not to compile source and by the laziness, I found instruction in the Internet to include jessie sources and install from it.

The installation didn't complete and I even didn't get nodejs and npm in my system. But now I have this problem in my locale settings:

# 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

I deleted jessie souce from sourses list. Then update and upgrade system. When I try to reinstall locales, I get this error, so some tailes from jessie still exists:

# apt-get install --reinstall locales
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 locales : Depends: glibc-2.13-1
           Depends: debconf (>= 0.5) but it is not going to be installed or
E: Unable to correct problems, you have held broken packages.

Could you help me? What can I do? Now this error appearse where often, especially during installation new packages. I don't know if it affect on other tasks, but I didn't feel the influence still.




sudo apt-get purge locales


sudo aptitude install locales

and the famous:

sudo dpkg-reconfigure locales

This rids the system of locales, then re-installs locales and downgrades libc6 from 2.19 to 2.13 which is the issue. Then configures locales again.

  • Make sure to select at least one locale with the spacebar when running sudo dpkg-reconfigure locales :)
    – gkop
    Apr 9 '15 at 15:28

Whenever someone tells you to add sources from unstable or testing onto your stable system, you should ignore them and keep looking for another option. This is the #1 most common way Debian systems get broken.

To fix your system, change all your sources back to wheezy, then run:

apt-get update
apt-get dist-upgrade
  • thanx a lot, but i had to create new vds and transfer sites to it. No other solutions could help. Jul 29 '14 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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