[Debconf-devel] Bug#1002636: debconf: dpkg-reconfigure locales crashes because /sbin is not in $PATH

Colin Watson cjwatson at debian.org
Sun Dec 26 13:09:35 GMT 2021


On Sun, Dec 26, 2021 at 10:52:47AM +0100, Lucio Messina wrote:
> STEP TO REPRODUCE:
> 1. have a debian fresh install
> 2. run `/usr/sbin/dpkg-reconfigure locales`
> 3. select the locales to generate
> 4. select the default locale
> 
> EXPECTED OUTCOME
> locales are regenerated without errors
> 
> ACTUAL OUTCOME
> dpkg-reconfigure crashes with error 
> /var/lib/dpkg/info/locales.postinst: 64: locale-gen: not found
> 
> REASON
> /usr/sbin is not in PATH by default, so the executable for locale-gen is not
> found. Manually running `/usr/bin/locale-gen` finishes the process as expected.
> Adding /usr/sbin to PATH before running `locale-gen` also works.

dpkg-reconfigure should only be run as root, and root's PATH normally
contains /usr/sbin.  It's not dpkg-reconfigure's job to set this up.

Can you explain more about the context in which you ran
"/usr/sbin/dpkg-reconfigure locales" (e.g. how exactly did you acquire a
root shell)?

-- 
Colin Watson (he/him)                              [cjwatson at debian.org]



More information about the Debconf-devel mailing list