In case you’re running Ubuntu 18.04 ( or earlier versions as well, such as 16.04, 14.04 ), you may be encountering a locales warning or error while trying to update your package index or installing a package.

As the locales package configuration states:

Locales are a framework to switch between multiple languages and allow users to use their language, country, characters, collation order, etc.

The error looks something like this:

You may encounter this error very often on a fresh install of Ubuntu or Debian.

One solution to fix this issue, first run the locale command to list the locales currently defined for your user account.

The output will look something like this:

To generate the missing locale and reconfigure locales, identify the name of your locale ( in my case de_DE.UTF-8), or use one another one that you prefer, such as en_US.UTF-8.

Then generate it using the following command:

And you’ll get the output:

After which, reconfigure locales using the following command:

And you’ll receive the output:

And now you shouldn’t receive any more errors!

If you’ve encountered any issues with this short tutorial, please feel free to let us know in the comments or by contacting us via our social media channels, and we’ll get back to you as soon as possible.

Get a High RAM VPS at Entry-level Pricing

Starting with 2GB RAM at $6.99/month

Take your pick from our KVM VPS that offer a generous amount of RAM at an affordable price. We've got 5 plans for you to choose from, our smallest featuring 2GB RAM at $6.99/mo.

[Main Features]
  - SSD Drives
  - KVM Virtualization
  - 1Gbps Shared Uplink
  - Location: Chicago, IL

Pick one of our KVM plans


Tech Support

Leave a Comment


Enter your email below to get 20% OFF on any of our Linux VPS plans and receive weekly deals on our services!