Score:0

Ubuntu 22.04 /var/lib/locales/supported.d

hr flag

I am attempting to upgrade an old Ubuntu 14 Docker image to 22.04. One of the commands in the Dockerfile is ln -s /usr/share/i18n/SUPPORTED /var/lib/locales/supported.d/all.

This is failing on Ubuntu 22.04 because the directory /var/lib/locales doesn't exist.

  • I could just create the directory before running the command, but I am not sure this will actually have the desired effect.
  • On Ubuntu 14 the file /usr/share/i18n/SUPPORTED exists as part of the base image... but on Ubuntu 22.04 I had to install the package locales to get that file to appear.
  • Is there another package I need to install to get the directory /var/lib/locales? Again I could just create the directory, but if the convention has changed creating the directory won't have any effect, since the locale files will never get picked up.

For reference here is the entire command

ln -s /usr/share/i18n/SUPPORTED /var/lib/locales/supported.d/all
locale-gen
export LANG=en_US.UTF-8
Score:1
in flag

The only important part of the three command lines you posted is probably the export LANG=en_US.UTF-8 setting up the desired language/locale.

The previous two appear to be workarounds to ensure that en_US.UTF-8 is properly supported and available.

On a modern Ubuntu I'd start with the locales package that is supposed to be installed by default and then run locale -a run to see what is supported out-of-the box and by default. For my Ubuntu 22 LTS that shows:

locale -a

C
C.utf8
POSIX
en_US.utf8

and then I'd migrate

ln -s /usr/share/i18n/SUPPORTED /var/lib/locales/supported.d/all
locale-gen
export LANG=en_US.UTF-8

to a simple:

export LANG=en_US.utf8

If that proves to be insufficient for the application you're running, you might need to install the language-pack packages: language-pack-en-base and/or language-pack-en.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.