3

After upgrading to Stretch, upon trying to enter webmin via the www, it gives an error instead:

Error - Perl execution failed

Can't locate WebminCore.pm in @INC (you may need to install the WebminCore module) (@INC contains: /etc/perl /usr/local/lib/i386-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/i386-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/i386-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/i386-linux-gnu/perl-base ..) at /usr/share/webmin/blue-theme/index.cgi line 4.
BEGIN failed--compilation aborted at /usr/share/webmin/blue-theme/index.cgi line 4.

Tried to add PERLLIB=/usr/share/webmin to ~root/.profile, it did not work.

Interestingly enough, when calling the webmin perl binary from the command line, it does not seem to throw any error.

What is happening?

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227

1 Answers1

5

It appears that in Stretch, there is a need for an extra PERL library PATH.

Upon inspection of the webmin perl code, I found out a configure directive perllibis accepted in the configuration file; and the code adds it to whatever is already configured in PERLLIB for the duration of the program.

24 %config = &read_config_file($config_file);
25 if ($config{'perllib'}) {
26         push(@INC, split(/:/, $config{'perllib'}));
27         $ENV{'PERLLIB'} .= ':'.$config{'perllib'};
28         }

So, I added to the file /etc/webmin/miniserv.conf the line:

perllib=/usr/share/webmin

And webmin started working.

P.S. If you arrived here due to problems in Webmin after migrating to Stretch see also Webmin stopped opening

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227