Most likely, the Perl on that machine is horribly broken. A part of this could be that certain vendors only install a stripped-down Perl distribution and name that package "perl-base". You want to install the package for the full Perl, that is named perl.
Hopefully this will remedy the error message of debconf that Term::ReadLine is not installed, but ideally, the debconf package should know about Term::Readline if it needs it at all.
Another idea might be that somehow your private changes to @INC bleed over into the system configuration, and will cause no end of sadness.
First, make sure that you have a full Perl, by using apt install perl.