Results 1 to 9 of 9

Thread: lwp

  1. #1
    Join Date
    Feb 2004
    Posts
    58

    lwp

    I'm having a problem getting lwp(libwww-perl) in one of my scripts to work so I ran the following command, which I got from another message board which is supposed to tell me whether lwp is functioning correctly:
    perl -e "use LWP::UserAgent;"

    This returned:

    Can't locate LWP/UserAgent.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 . /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503) at -e line 1.
    BEGIN failed--compilation aborted at -e line 1.


    Is there anyway I can fix this? I just installed it from the ports. I did the same thing a few days ago on another server and it worked perfectly. Any ideas anybody?

  2. #2
    Join Date
    Jan 2004
    Location
    Brit in Calgary, Canada
    Posts
    71
    why not try perl -MCPAN -e 'install LWP::Useragent'

  3. #3
    Join Date
    Feb 2004
    Posts
    58
    I got an error when I tried that. Whats wrong with installing it from ports?

  4. #4
    Join Date
    Jan 2004
    Location
    Brit in Calgary, Canada
    Posts
    71
    Have you cvsup'd your ports collection recently? (I'm assuming you're using FreeBSD ports).

    You might want to install a newer version of Perl, 5.005 is awfully old. At least 5.6.1 - a fresh ports build will give you 5.8.something.

  5. #5
    Join Date
    Feb 2004
    Posts
    58
    I installed perl 5.8 but get the same problem....

  6. #6
    Join Date
    Jan 2004
    Location
    Brit in Calgary, Canada
    Posts
    71
    Two things:

    1) Check that the new version of Perl is the active version

    $ perl -v

    If it's not the version you just installed, type this:

    # use.perl port

    2) Reinstall p5-libwww via ports or try the CPAN way I described above.

    --
    If those fail, post the exact error message you are getting!

  7. #7
    Join Date
    Jan 2004
    Location
    Brit in Calgary, Canada
    Posts
    71
    My apologies, the CPAN method I wrote earlier is erroneous - if you choose to install via CPAN, swap LWP::Useragent with Bundle::LWP

  8. #8
    Join Date
    Feb 2004
    Posts
    58
    That did the trick(Bundle::LWP). Thanks for your time everyone.

  9. #9
    This seems like a much better location!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •