I get this error each time I update the system using apt-get. What does this error mean? Any ideas on how to correct it? (I am running Ubuntu 11.10)

  • 1
    The problem is apparently the lowercase "utf8". The "sudo update-locale LANG=en_US.UTF-8" should do the trick. – stolsvik Jun 29 '14 at 23:13
  • I want to add that I also get this "error" when the mysql service is disabled (if installed) while updating on Mint. After enabling it, the problem disappear. – not2qubit Nov 22 '17 at 16:56
up vote 55 down vote accepted

Usually this error means that you could have been changing between different languages (locales) and something has caused this to error erroneously.

You could try regenerating your list of locales with

sudo dpkg-reconfigure locales

For me the result was:

Generating locales...
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... up-to-date
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.

Then resetting your local locale with:

sudo update-locale LANG=en_US.UTF-8

i.e. use one of the Locale values in the output above

In my case, the problem was that /usr/share/initramfs-tools/hooks/root_locale is expecting to see individual locale directories in /usr/lib/locale but locale-gen is configured to generate an archive file by default.

I fixed it by running:

sudo locale-gen --purge --no-archive
  • 2
    Per: man locale-gen Matt's explanation is correct, all locales are no longer in individual directories due to size limitations in libc. "locale-gen is a program that reads the file /etc/locale.gen and invokes localedef for the chosen localisation profiles." Warning: no support for locale: xx_XX.utf8 is fixed by his answer :) +1 – xtrchessreal Oct 31 '17 at 20:11

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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