How to install perl pakage
There are many methods to install perl module or pakage to use in your program:
1. Using CPAN
Install cpan if not installedto install a module say "Spreadsheet::Read" run the following command:
sudo cpan install module
Example:
sudo cpan install Spreadsheet::Read
2. With the help of the tar or zip file of the package
follow the following steps:
download the tar of the package required from cpan directory
example for Spreadsheet::Read
go to cpan.org and search the module required.
write click on the tar of the module on the right side of the page and select coppy link location.
come to the terminal and run
1.wget http://search.cpan.org/CPAN/authors/id/H/HM/HMBRAND/Spreadsheet-Read-0.54.tgz
this will download the package to the current location
extract the package
2.tar -xvzf pakagename
tar -xvzf Spreadsheet-Read-0.54.tgz
3.cd Spreadsheet-Read-0.54
on reaching inside the folder extracted run the following command
4.sudo perl Makefile.pl
5.make
6.sudo make install
and following these major steps you can easily install any pakage required.
No comments:
Post a Comment