Virtualmin Installation Error: Can't locate Virtualmin/Config.pm in @INC

Background

Encounter "Can't locate Virtualmin/Config.pm in @INC" error during the virtualmin installation

How to reproduce?

OS: Ubuntu 18.04 LTS
Machine: AWS EC2
Virtualmin: installation script on 2020/07/14

Error Message

▣▣▣ Phase 3 of 3: Configuration
Can't locate Virtualmin/Config.pm in @INC (you may need to install the Virtualmin::Config module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/virtualmin-config-system line 9.
BEGIN failed--compilation aborted at /usr/bin/virtualmin-config-system line 9.
▣▣▣ Cleaning up

Solution

edit file /usr/bin/virtualmin-config-system
add the "BEGIN { push @INC, '/usr/share/perl5/vendor_perl'; }" on line 9

  #!/usr/bin/env perl
use strict;
use warnings;
use 5.010_001;
use Getopt::Long;
BEGIN { $Pod::Usage::Formatter = 'Pod::Text::Color'; }
use Pod::Usage qw(pod2usage);
use Term::ANSIColor qw(:constants);
BEGIN { push @INC, '/usr/share/perl5/vendor_perl'; }
use Virtualmin::Config;
  


Reference

https://www.virtualmin.com/node/69147

Popular posts from this blog

Backup and Restore in Virtualmin

F3 check for faulty and fake SD card