Question

How do you install a perl module on ubuntu.

Posted July 1, 2014 25.7k views

Hi,

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/RawIP.pm 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

Thanks

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.

×
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:

Debian/Ubuntu:
Only use sudo if the stack was installed as root.

sudo apt-get install perl

CentOS/Fedora/RHEL:
Only use sudo if the stack was installed as root.

sudo yum install perl perl-Data-Dumper

Submit an Answer