Need help in installing perl *.pm files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need help in installing perl *.pm files
# 1  
Old 04-13-2011
Need help in installing perl *.pm files

Hi,

I need to install Sys::HostAddr inorder to run the following command:
Code:
perl -le 'use Sys::Hostaddr; print Sys::HostAddr->new->main_ip'

I tried installing this package using CPAN by using the following command:

Code:
$ sudo perl -MCPAN -e shell

cpan> install Sys::HostAddr

But still I am not able to use the command which I intended to. I am getting the same error
Code:
Can't locate Sys/Hostaddr.pm in @INC at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

Please help me in resolving this problem.

I am using Ubuntu 10.04 LTS 32-bit PC. My perl version is v5.8.8.

Last edited by royalibrahim; 04-13-2011 at 07:26 AM..
# 2  
Old 04-13-2011
Perl modules are case sensitive. Change Hostaddr to HostAddr and it should work.
# 3  
Old 04-13-2011
Quote:
Originally Posted by pludi
Perl modules are case sensitive. Change Hostaddr to HostAddr and it should work.
Sorry that was a typo. But, still it is not working Smilie. Could anyone help me with this?

Last edited by royalibrahim; 04-14-2011 at 01:49 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Installing perl module

Hi, I want to install WWW:Mechanize module. Followed the following steps: 1. wget http://www.cpan.org/authors/id/C/CO/CORION/Bundle- WWW-Mechanize-Shell-0.29.tar.gz perl Makefile.PL make make test make install (Got the below message) Appending installation info to... (1 Reply)
Discussion started by: Anjan1
1 Replies

2. Red Hat

installing perl modules

Hi All, I have a customer asking me to install these perl modules on redhat 4 ent: File::Temp Getopt::Long DBD::mysql Mail::Mailer DBD::DB2 Any idea how can I install those modules. Thanks for any comment you may add. (3 Replies)
Discussion started by: itik
3 Replies

3. Shell Programming and Scripting

Installing Perl/Tk in x86_64

Hi, experts, I am trying to intall Perl/Tk module (Tk-804.028 ) into Perl5.6.1, however, the directory structure seems to be different from i386 than x86_64 and the installation keeps failing. Is this a known/common issue? Or does anyone has any workaround for this? ~* Dniz *~ (0 Replies)
Discussion started by: dniz
0 Replies

4. UNIX for Dummies Questions & Answers

installing perl modules

I resulted to using /usr/sfw/bin/gmake to install my perl modules until i ran into a problem installing perl/Tk Tk-804.028 gmake: Entering directory `/export/home/Tk-804.028/pod' Sorry no HTML building yet gmake: Leaving directory `/export/home/Tk-804.028/pod' I dont unstand what the error... (2 Replies)
Discussion started by: jameskay
2 Replies

5. Shell Programming and Scripting

Installing Perl Module

Hi All, When I tried to install Math::Pari module in a AIX 5.3 server,I am getting the following error. # pwd /usr/local/bin # cd Math-Pari-2.010709 # perl Makefile.PL Did not find GP/PARI build directory around. Do you want to me to fetch GP/PARI automatically? (If you do not, you... (2 Replies)
Discussion started by: surjithss
2 Replies

6. Shell Programming and Scripting

Installing Perl DBI and DBD

Hi, i have some queries on installing the Perl DBI and the DBD Oracle. I know that i have to install the DBI first. I have the source files in a folder in my home directory.The commands to install arecd /home/DBI Perl Makefile.PL make make installI would like to know, after executing these... (4 Replies)
Discussion started by: new2ss
4 Replies

7. Shell Programming and Scripting

Can I use a Perl Module without installing it?

I am trying to write a program that will use templates, so I figured I would use the Text::Template CPAN module... ...only problem is that I cant force my "clients" to install this module, cause they are clueless. Is there anyway that I can NOT install it for the whole machine, but install it... (1 Reply)
Discussion started by: jjinno
1 Replies

8. Shell Programming and Scripting

Installing Perl Modules

I have a script that uses the File::Listing module. I am trying to install it, but I read the ReadMe and it states that the following modules should be installed first: URI MIME-Base64 HTML-Parser libnet Digest-MD5 Compress-Zlib I am very new to Perl and would apprciate anyone's input on... (1 Reply)
Discussion started by: ssmiths001
1 Replies

9. UNIX for Advanced & Expert Users

Perl Installing, Uninstalling

I have some problems with mysql, and maybe perl installation faults. I have installed perl by source. I followed default configuration (e.g. ./configure, make, make install). I have installed perl just because it was required for mysql's installation. But now I have some problems. If I will... (8 Replies)
Discussion started by: kisoun
8 Replies

10. Shell Programming and Scripting

Re-Installing Perl

I changed a few perl modules that it seems I should not have... Any way that I can re-install perl from scratch? (1 Reply)
Discussion started by: frustrated1
1 Replies
Login or Register to Ask a Question