[Perl] Install a Perl module

Hi all,

I use latest IPFire version (2.29 - 195)

I would like to install perl module, which are not listed.
So, I would like to use cpan command, but I don’t find it.
With locate commande, I see cpan in /usr/lib/perl5/site_perl/5.36.0/LWP/Protocol/. So, I add this directory in my command perl -Idirectory '/usr/lib/perl5/site_perl/5.36.0/LWP/Protocol/cpan.pm' -Mcpan ..., but nothing.

I hope someone can help me.

Thanks

First of all, the module is CPAN.pm.

Hallo @m-yucca

Welcome to the IPFire community.

That is because the cpan binary is not installed. This would be a security issue as then if some vulnerability allowed an attacker access they could then use cpan to install any perl package they wanted, such as their own malware directly on your firewall.

If there is a specific perl module you want to install then you can build it as your own local addon.

Details for how to do this is in the wiki documentation.

https://www.ipfire.org/docs/devel/ipfire-2-x/addon-howto

https://www.ipfire.org/docs/devel/ipfire-2-x/build-initial

https://www.ipfire.org/docs/devel/ipfire-2-x/build-howto

2 Likes

Hi,

Thanks for your reply.

I don’t understand, I put cpan.pm (as it listed with ls command) in option arg.

I think it’s too complicated for what I want to do.
My goal is “just” to install GLPI agent (it’s a perl script), but I need ExtUtils::MakeMaker Perl module to do that.
So, I will use snmp agent to do that.
Thanks