Skip to content

apt error: setting locale failed

This can happen sometimes on fresh minimal/alternate installs or in other situations. The fix is pretty simple. Try these, in the following order, testing after each to see if the situation is fixed:

  1. Reconfigure locales
    sudo dpkg-reconfigure locales

    if that doesn’t work

  2. Reinstall locale language-pack
    sudo apt-get --reinstall install language-pack-it

    if that doesn’t work,

  3. Manually force locale settings (persistent)
    sudo update-locale LC_ALL=it_IT.UTF-8 LANG=it_IT.UTF-8

Last updated: 11 Febbraio 2015 by Pierluigi Minati