How do you install a perl module on ubuntu.

Posted July 1, 2014 33.3k views


I have been trying now for three days but I just don’t understand how you install a module with perl. I am trying to install the module Net::RawIP.

(This is the error I keep getting)
Can’t locate Net/ in @INC (you may need to install the Net::RawIP module)

I hope someone can help me! This is driving me crazy lol.

OS: Ubuntu 14.04


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

how to install require in perl

You can install RawIP by installing the libnet-rawip-perl package:

sudo apt-get install libnet-rawip-perl

Install Perl And Required Perl Modules
The installation of MySQL requires Perl to be present, in combination with some Perl modules.

You can check if your system contains Perl with the following command:

which perl

You must also ensure that the Data::Dumper Perl module exists, which can be done with the following command:

perl -MData::Dumper -e ‘print “Data::Dumper is installed\n”’

If Perl or Data::Dumper are not present, run the following commands for installing the missing components:

Only use sudo if the stack was installed as root.

sudo apt-get install perl

Only use sudo if the stack was installed as root.

sudo yum install perl perl-Data-Dumper