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

Lucio Messina luciotuttominuscolo at inventati.org
Sun Dec 26 17:18:23 GMT 2021


Hi Colin,
thank you for your fast reply.

I confirm that root's PATH does not contain /usr/sbin in my debian 
testing (bookworm) fresh install. I acquired the root shell using the 
`su` command. Then I ran `dpkg-reconfigure locales` but I got the error 
`bash: dpkg-reconfigure: command not found` so I ran 
`/usr/sbin/dpkg-reconfigure locales` as explained before.

Best regards,
Lucio

On 26/12/2021 14:09, Colin Watson wrote:
> 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)?
>



More information about the Debconf-devel mailing list