adding perl module on cpanel's 5.14 internal perl

markhard

Well-Known Member
Apr 22, 2004
252
0
166
hello,

since munin now using cpanel's internal perl 5.14 my nginx graph didn't generated as it requires "LWP::UserAgent". how do i add this module? /scripts/perlinstaller is installing to the system's perl module and not cpanel's perl
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
Hello,

Documentation on this topic is available here: Internal Perl Modules

In short:

/scripts/perlinstaller is for adding modules to the OS perl (/usr/bin/perl)
/usr/local/cpanel/3rdparty/perl/514/bin/cpan is for installing modules for cPanel & WHM's perl
 

markhard

Well-Known Member
Apr 22, 2004
252
0
166
thanks for pointing out, i was reading that article but got confused with scripts/perlinstaller
 

markhard

Well-Known Member
Apr 22, 2004
252
0
166
i managed to install LWP::UserAgent with this command:

/usr/local/cpanel/3rdparty/perl/514/bin/cpan -i LWP::UserAgent
but i'm still getting errors:

Can't locate object method "new" via package "LWP::UserAgent" at /etc/munin/plugins/nginx_status
 

markhard

Well-Known Member
Apr 22, 2004
252
0
166
i got it fixed, the script was still calling the system perl instead of cpanel perl