How do you install a perl module on ubuntu.

July 1, 2014 24.4k 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


3 Answers

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

sudo apt-get install libnet-rawip-perl

how to install require in 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

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!