I am trying to setup my DNS servers (name servers, essentially) – in this process I’m following the guide provided - Domain Registration With Virtualmin – Virtualmin
however, when I try to add my account I receive the error:
Can’t locate XML/RPC.pm in @INC (you may need to install the XML::RPC module) (@INC contains: /usr/share/webmin/vendor_perl /usr/share/webmin /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl … .) at (eval 150) line 1. BEGIN failed–compilation aborted at (eval 150) line 1. : virtualmin-registrar/save.cgi (line 77)
I have installed the perl modules,
librpc-xml-perl
perl
cpan RPC::XML
You are correct it is a fresh install of Ubuntu 22.04
I agree that it should not require any additional work - however, I am receiving this error message that when you google it, looks like it’s related to a Perl issue.
There is no documentation on that with VirtualMin and it seems no one else has encountered it yet, so I am looking at alternative solutions until a time that this can be addressed.
some one far more in tune with Perl should pick this up. (I am still at the start of the book on that so a long way to go) But you are right Virtualmin does not normally require anything extra as long as it is a clean install. someone from @staff will be along later to be of more help. BTW Welcome to the community.
I am using Virtualmin 7.8.2 and as mentioned above the standard package manager for Ubuntu 22.04 is only providing Perl 5.034 which seems good enough for me (just playing about with Perl) and running VS → but have to admit I don’t use Virtualmin to manage DNS so perhaps that is the problem?
perhaps I am confused … not sure now if this has anything to do with DNS … I found the perl error when trying to use Addresses And Networking – DNS Domain Registrars
BTW, is that labeled poorly?? Why does it have ‘dns’ on the front of ‘Domain Registrars’ ? Granted I have never used it and only peeked at it today because of the OP’s post
BTW, in searching the (Virtualmin GPL) code on my server, I find that only /usr/libexec/webmin/virtualmin-registrar/newgandi-type-lib.pl uses that perl module.
Is that a “Pro” option I don’t have that in the GPL version. So perhaps that is a pointer to the problem. - I didn’t think the “Pro” version used anything extra outside the GPL (obviously I could be wrong) perhaps it could be librpc-xml-perl though I did think that was a standard module.
What happens if you run the following on the command line:
perl -MXML::RPC
And, what does this return:
dpkg -l librpc-xml-perl
And, I saw mention of Perl version in this thread, and I don’t know why it keeps coming up. Perl version is entirely irrelevant. Every Grade A supported distro has a Perl version that has been thoroughly tested with Webmin and Virtualmin and is expected to work. You always use the packages provided by your OS, when possible.
on my RedHat system, I first had to go to Virtualmin – System Settings – Features and Plugins
once there, I needed to check the left hand box next to DNS Domain Registration to make it visible under Addresses and Networking.
And I don’t have that perl module:
[root@vhost89 ~]# perl -MXML::RPC
Can’t locate XML/RPC.pm in @INC (you may need to install the XML::RPC module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5).
BEGIN failed–compilation aborted.
Maybe the perl module has a different name in the RPM environment —
[root@vhost89 ~]# yum list librpc-xml-perl
Last metadata expiration check: 0:39:41 ago on Mon 04 Dec 2023 09:55:51 PM EST.
Error: No matching Packages to list
I did find:
[root@vhost89 ~]# yum list perl-libxml-perl
Last metadata expiration check: 0:43:47 ago on Mon 04 Dec 2023 09:55:51 PM EST.
Available Packages
perl-libxml-perl.noarch 0.08-33.el8 wvnet-rhel-8-for-x86_64-appstream-rpms
but again in my RedHat environ, I’m not sure if that’s what is needed
And I feel embarrassed because as a full-time Linux admin, I should be able to figure this perl stuff out !!
Perl module packages have a different naming convention in EL systems. lt’d be perl-XML-RPC, I believe.
But, now I see that XML::RPC is not in the repos for recent RHEL, and OP is talking about the wrong package, too.
RPC::XML is not XML::RPC. @TheMidnighter, you’re installing RPC::XML, which is not the module this is looking for.
XML::RPC does still exist and it is maintained, but if it has left the OS repos, we’re going to have to switch to something else, presumably RPC::XML, but that will require code changes. The two modules are not compatible. I’ll have to talk to @Jamie about that. It may be that only place you can easily get XML::RPC is cpan, which sucks. (I don’t mean cpan sucks, I mean installing software from cpan on a production server sucks.)
Very little maintainance goes into this module. While it continues to work, is has certain quirks that may or may not be fixable without breaking backward compatibility.
I strongly recommend that, before deciding what to use in a new project, you look into Randy Ray’s RPC::XML module. This seems to be a much more modern approach.
but in looking at the Randy Ray item mentioned above, its CHANGELOG has the last update way back on Jan 2021. AND I cannot find Randy’s package in my repos on my RedHat 8 server (but my RedHat 7 server repos do list Randy’s package perl-RPC-XML)
Abandoned or “done”? XML RPC is mostly a deadend idea, so nobody is doing new work on it, in Perl or anywhere else. As long as there are no known security issues, it works as-is.
And, yeah, @Ilia , you’re right, this one is pure-Perl. If it’s small enough, we should just bundle it.