When using a Linux distribution like Debian, you may have encountered issues related to the locale. One common error that often appears is the following message:

apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_TIME = "id_ID.UTF-8",
    LC_MONETARY = "id_ID.UTF-8",
    LC_ADDRESS = "id_ID.UTF-8",
    LC_TELEPHONE = "id_ID.UTF-8",
    LC_NAME = "id_ID.UTF-8",
    LC_MEASUREMENT = "id_ID.UTF-8",
    LC_IDENTIFICATION = "id_ID.UTF-8",
    LC_NUMERIC = "id_ID.UTF-8",
    LC_PAPER = "id_ID.UTF-8",
    LANG = "C.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("C.UTF-8").

This message indicates that the system is unable to set the requested locale (id_ID.UTF-8) because the locale has not been installed or configured properly. This issue generally occurs when the locale settings in environment variables (LC_*, LANG, etc.) do not match the locales available on the Debian system.

A locale is a regional setting used by the operating system to determine language format, date, time, currency, and other localization-related settings. When a program, such as Perl or apt-listchanges, tries to use a specific locale but fails to find it, it will issue a warning and fall back to the default locale (C.UTF-8).

In this case, the system attempted to use id_ID.UTF-8 (Indonesian language), but this locale was not available on the system.

Solution Steps

1. Check Installed Locales

To check which locales are already installed on the system, run the following command:

locale -a

This command will display a list of all available locales. Look for id_ID.UTF-8 in the output. If it is not present, you will need to generate that locale.

2. Generate the Missing Locale

If id_ID.UTF-8 is not listed, you can create it by following these steps:
Open the locale configuration file:

sudo nano /etc/locale.gen

Find the line corresponding to id_ID.UTF-8 and remove the # at the beginning of the line to activate it. The line should look like this:

id_ID.UTF-8 UTF-8

After saving the file, run the following command to generate the locale:

sudo locale-gen

Update the system’s locale settings:

sudo update-locale

Check whether the locale has been successfully created by running:

locale -a

Seharusnya sekarang melihat id_ID.UTF-8 dalam daftar.