I installed webmin the other day on a test platform. Ubuntu 18.04 I needed to test 2FA with Google Authenticator. Webmin wouldn't install the necessary perl modules automatically. I first installed the "build-essentials" package group to make sure 'make' was installed.
I made some steps that I can plant into an .sh script and run it to do the install automatically. I did a sudo -i and then changed directory back to my ~/ where the script was located and ran ./script.sh. This works very well! My big concern is that if I ever upgrade packages via apt,that the perl modules that have been installed via the 'perl -MCPAN -e' method may break because of a dependency. I've had folks from the virtualmin forum suggest I find a 3rd party repo for ubuntu that has pre built packages for the perl modules that I manually installed. I find that to be a dicey proposition because 3rd party repo's come and go. If there was a method that was script-able by which I could run commands that "upgrade" the modules manually I feel that would be more reliable method of keeping the software current. Are there any reliable repo's out there for ubuntu that holds pre built packages for the modules shown below? Or a perl -MCPAN command that upgrades said modules? I'm afraid this question is quite specialized and won't gain much traction. Apologies if so. Thanks in advance for anyone that can answer.
===========================================================================
Script follows:
echo -e '#Webmin_Repository
deb http://download.webmin.com/download/repository sarge contrib' >> /etc/apt/sources.list
wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc
apt update
apt install -y webmin
apt install -y build-essential
perl -MCPAN -e "install Test::Moose"
perl -MCPAN -e "install Types::Standard"
perl -MCPAN -e "install Moo"
perl -MCPAN -e "install Authen::OATH"
exit