Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Problem with installing LWP w/Perl 5.005

Problem with installing LWP w/Perl 5.005

Problem with installing LWP w/Perl 5.005

Pardon me if this is a stupid question.  I'm kinda new at Perl. I'm trying to run a Perl script that uses the LWP library and have been getting a strange error.  LWP was recently installed on this older Perl (5.005) and now it can't seem to find LWP.  My host attempted a Perl 5.6 installation and failed miserably at it so it's either get LWP working with 5.005 or (shudder) find a PhP solution.  Any suggestions would be greatly appreciated.

Here's the start of my script.

#comment lines snipped

use LWP::Simple;
use LWP::UserAgent;

Here's the error we're getting:

Can't locate LWP/Simple.pm in @INC (@INC contains: /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 .) at /nfs/home/d/u/dunsel/public_html/cgi-bin/odp/odp.pl line 9.
BEGIN failed--compilation aborted at /nfs/home/d/u/dunsel/public_html/cgi-bin/odp/odp.pl line 9.
[Fri Jan  5 18:39:04 2001] [error] [client] Premature end of script headers: /nfs/home/d/u/dunsel/public_html/cgi-bin/odp/odp.pl
Here's the directory with Simple.pm

> root@uws1:/usr/local/lib/perl5/site_perl/5.005/LWP
> total 62
> drwxr-xr-x 4 root wheel 512 Jan 5 18:36 .
> drwx------ 16 root wheel 512 Jan 5 23:55 ..
> drwxr-xr-x 2 root wheel 512 Jan 5 18:36 Authen
> -r--r--r-- 1 root wheel 3104 Dec 2 1997 Debug.pm
> -r--r--r-- 1 root wheel 7036 Nov 16 1999 MediaTypes.pm
> -r--r--r-- 1 root wheel 900 Dec 2 1997 MemberMixin.pm
> drwxr-xr-x 2 root wheel 512 Jan 5 18:36 Protocol
> -r--r--r-- 1 root wheel 7982 Apr 9 2000 Protocol.pm
> -r--r--r-- 1 root wheel 6932 Apr 9 2000 RobotUA.pm
> -r--r--r-- 1 root wheel 8069 May 24 2000 Simple.pm
> -r--r--r-- 1 root wheel 20137 Jun 1 2000 UserAgent.pm
> -r--r--r-- 1 root wheel 2828 Nov 11 1996 media.types
> root@uws1:/usr/local/lib/perl5/site_perl/5.005/LWP
And here's a dump of my hosts re-install of LWP thinking it was bad.

> root@xxx1:~# perl -MCPAN -e 'install Bundle::LWP'
> Going to read /home/nbd/.cpan/sources/authors/01mailrc.txt.gz
> CPAN: Compress::Zlib loaded ok
> Going to read
> /home/nbd/.cpan/sources/modules/02packages.details.txt.gz
> Going to read /home/nbd/.cpan/sources/modules/03modlist.data.gz
> URI is up to date.
> Net::FTP is up to date.
> MIME::Base64 is up to date.
> Digest::MD5 is up to date.
> HTML::HeadParser is up to date.
> LWP is up to date.

The directory above LWP appears to be in Perl's search path which I though was all that was needed.  LWP is installed and the uses statement is right... what are we doing wrong.  Please explain in details I'm still a Perl neophyte.

Thanks for any help you can give.

RE: Problem with installing LWP w/Perl 5.005

I might be way off track here, but here is my thought...

It looks like the error message you are reproducing is
coming from a web server which is running the script from
an nfs drive located on another machine?

If this is the case, you need to have LWP installed on the
web server machine (maybe you already do?  Is the web server
xxx1 and the nfs drive with odp.pl is on machine uws1?)

Anyway, after I'm done blathering, I'd log on to the web
server machine, go to directory /nfs/home/d/u/dunsel/public_html/cgi-bin/odp/
and try a 'perl -c odp.pl' command.  If this fails, you
need to get LWP on the web server, or modify @INC in
odp.pl to use an (nsf mounted?) LWP from somewhere else.

RE: Problem with installing LWP w/Perl 5.005

Thanks for your suggestions.  
I've tried running Perl with the -c option, no luck.
I modified the @inc to look in the LWP directory,
No luck

My host has finally conceeded though.  He claims he'll be building a new server within the week for us 'sophisticated' types.  Didn't know I'd graduated.  Hopefully, that will solve my problems.

-Thanks again.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close