Marc Haber, le jeu. 27 mars 2025 22:01:18 +0100, a ecrit:
> On Thu, Mar 27, 2025 at 07:19:40PM +0100, Samuel Thibault wrote:
> > # deluser
> > Can't locate File/Find.pm in @INC (you may need to install the File::Find 
> > module) (@INC entries checked: /etc/perl 
> > /usr/local/lib/x86_64-linux-gnu/perl/5.40.1 /usr/local/share/perl/5.40.1 
> > /usr/lib/x86_64-linux-gnu/perl5/5.40 /usr/share/perl5 
> > /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.40 
> > /usr/share/perl/5.40 /usr/local/lib/site_perl) at /usr/sbin/deluser line 48.
> > BEGIN failed--compilation aborted at /usr/sbin/deluser line 48.
> 
> That should not happen. It made me jump directly to stage six of the "six
> stages of debugging". How could this ever have worked?!?
> 
> This is also present in the current version of adduser, 3.149. May I ask why
> you were testing with a version from half a year ago?

It just happens that I haven't updated my trixie system for a couple of
weeks, and 3.137 has still the last migrated version a couple of weeks
ago.

> Try this patch please, against adduser 3.149
> 
> diff --git a/deluser b/deluser
> index d41d45e..4054f1f 100755
> --- a/deluser
> +++ b/deluser
> @@ -45,13 +45,13 @@ my $install_more_packages;
>  BEGIN {
>      local $ENV{PERL_DL_NONLAZY}=1;
>      eval {
> -        use File::Find;
> +        require File::Find;
>      };
>      if ($@) {
>        $install_more_packages = 1;
>      }
>      eval {
> -        use File::Temp;
> +       require File::Temp;
>      };
>      if ($@) {
>          $install_more_packages = 1;

That works, indeed!

Samuel

Reply via email to