89luca89 / 89luca89/distrobox

[Error] Invalid locale settings causing container crash

Ouverte
#1,954 5 commentaires 5 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Go
Étoiles
13k
Forks
541
Merge moyen
20 h 47 min
PR mergées (30 j)
4

Description

**Describe the bug**
`distrobox-enter` crashes because an invalid locale is passed to `update-locale`. This issue does not exist in all images.

**To Reproduce**
- Create a new container using `distrobox create --name custom --image quay.io/toolbx-images/debian-toolbox:13`
- Enter the container (`distrobox enter custom`)
- The container crashes with `Error: An error occurred`

**Expected behavior**
The container should launch as expected

**Logs**
```
mount: /run/systemd/journal: mount point does not exist.
dmesg(1) may have more information after failed mount system call.
mount: /run/systemd/journal: mount point does not exist.
dmesg(1) may have more information after failed mount system call.
mount: /run/systemd/resolve: mount point does not exist.
dmesg(1) may have more information after failed mount system call.
mount: /run/systemd/resolve: mount point does not exist.
dmesg(1) may have more information after failed mount system call.
+ [ -e /etc/locale.gen ]
+ locale -a
+ grep -qi en_us.utf8
+ sed -i s|#.*en_US.UTF-8|en_US.UTF-8|g /etc/locale.gen
+ sed -i s|#.*en_IN.UTF-8|en_IN.UTF-8|g /etc/locale.gen
+ locale-gen
Generating locales (this might take a while)...
error: Bad entry 'en_IN.UTF-8 '
en_US.UTF-8... done
Generation complete.
+ update-locale LC_ALL=en_IN.UTF-8 LANG=en_IN.UTF-8
*** update-locale: Error: invalid locale settings: LANG=en_IN.UTF-8 LC_ALL=en_IN.UTF-8
----------
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
ANSI_X3.4-1968
----------
+ [ 255 -ne 0 ]
+ printf Error: An error occurred\n
Error: An error occurred
```

**Desktop (please complete the following information):**

- Which version or podman, docker or lilipod? podman version 5.7.1
- Which version of distrobox? distrobox: 1.8.2.2
- Which host distribution? Fedora Linux 43
- How did you install distrobox? `dnf`

**Additional context**
Crashing on:
- `quay.io/toolbx-images/debian-toolbox:13`
- `quay.io/toolbx-images/debian-toolbox:12`

Not crashing on:
- `quay.io/toolbx/ubuntu-toolbox:24.04`
- `quay.io/toolbx/arch-toolbox:latest`

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.