Webmin don't work after fresh install

I have installed Webmin v 2.510 on AlmaLinux 9.6, but receive an error in miniserv.error:
Perl module IO::Pty needed for calling sudo is not installed : Can’t locate IO/Pty.pm in @INC (you may need to install the IO::Pty module) (@INC contains: /usr/libexec/webmin /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at (eval 20) line 1.
BEGIN failed–compilation aborted at (eval 20) line 1.
and can’t connect to it

The error seems strange but what if you install the missing module:

sudo yum makecache --refresh (only to check repository updates)
sudo yum install perl-IO-Pty

I’m not sure with AlmaLinux but if not yum maybe dnf:

sudo dnf makecache --refresh (only to check repository updates)
sudo dnf install perl-IO-Pty

Sorry if I said a mistake

How did you install Webmin? If you installed as documented (https://webmin.com/download/), the package manager should have installed dependencies for you.

I did some digging on this, and it looks like perl-IO-Tty is no longer in the regular OS repos in recent Rocky and Alma versions. You have to enable CRB (CodeReady Builder) repo for it on Rocky, and I’m not sure where it is for Alma.

On Rocky, you can do:

sudo dnf config-manager --set-enabled crb

This may or may not work on Alma (depends on whether they named their extras repo crb or not).

Then install the perl-IO-Tty package and restart Webmin.

Thanks for reply!
I have updated Webmin to v 2.600. Mistake remains the same, but Webmin works, only terminal don’t work.
After executing dnf config-manager --set-enabled crb, I have installed missing module and now everything is ok

Yes, we refactored logins to not use IO::Tty in response to this conversation. We had to confirm there were no longer any popular supported operating systems that had the requiretty option enabled by default in sudo. A few years ago, we needed that TTY for the sudo login type to work, but that’s not longer commonly enabled.

But, there are cases where the code must have an interactive TTY interface…the Terminal and several other features are among them. There’s nothing we can do about those…the only way to get an interactive session is to bind to it at the system level and that takes a binary layer of some sort, which we get from IO::Tty. Those features will never work (and you’ll get an error in the error log about it) until you install the package I suggested you install.

I’ve created a fallback for the Terminal module to work as well, so IO::Tty is no longer required at all.

3 Likes

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.