Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

LWP::UserAgent @ Ubuntu 8.04 64-Bit

by timb (Novice)
on Aug 12, 2010 at 13:11 UTC ( #854672=perlquestion: print w/replies, xml ) Need Help??

timb has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks, I'm stuck with "porting" my perlscript to above mentioned machine.

Usually I just copy my perlprog to the new machine and do a perl -MCPAN -e shell followed by install LWP::UserAgent Until now those steps were enough to get it to work on every Windows- and Linux-machine. I hope someone of you knows how to challenge below errors.

big thanks in advance
tiMb

Running make test /usr/bin/perl t/TEST 0 base/common-req.t ......... ok base/cookies.t ............ 1/66 Day too big - 88298 > 24855 Sec too big - 88298 > 11647 base/cookies.t ............ ok base/date.t ............... ok base/headers-auth.t ....... ok base/headers-etag.t ....... ok base/headers-util.t ....... ok base/headers.t ............ ok base/http-config.t ........ ok base/http.t ............... ok base/listing.t ............ ok base/mediatypes.t ......... ok base/message-charset.t .... ok base/message-old.t ........ ok base/message-parts.t ...... ok base/message.t ............ 90/125 # Test 116 got: <UNDEF> (base/messa +ge.t at line 480) # Expected: "Hello world!\n" # base/message.t line 480 is: ok($m->decoded_content, "Hello worl +d!\n"); # Failed test 117 in base/message.t at line 481 # base/message.t line 481 is: ok($m->decode); # Test 118 got: "QlpoOTFBWSZTWcvLx0QAAAHVgAAQYAAAQAYEkIAgADEAMCBoYlnQe +SEMvxdyRThQkMvLx0Q=\n" (base/message.t at line 482) # Expected: "Hello world!\n" # base/message.t line 482 is: ok($m->content, "Hello world!\n"); base/message.t ............ Failed 3/125 subtests (less 6 skipped subtests: 116 okay) base/negotiate.t .......... ok
.....
Test Summary Report ------------------- base/message.t (Wstat: 0 Tests: 125 Failed: 3) Failed tests: 116-118 Files=37, Tests=1154, 26 wallclock secs ( 0.29 usr 0.11 sys + 2.63 c +usr 0.75 csys = 3.78 CPU) Result: FAIL Failed 1/37 test programs. 3/1154 subtests failed. make: *** [test] Error 255 GAAS/libwww-perl-5.836.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports GAAS/libwww-perl-5.836.tar.gz Running make install make test had returned bad status, won't install without force Failed during this command: GAAS/libwww-perl-5.836.tar.gz : make_test NO

Replies are listed 'Best First'.
Re: LWP::UserAgent @ Ubuntu 8.04 64-Bit
by marto (Cardinal) on Aug 12, 2010 at 14:12 UTC

    A word of warning, if I where you I'd leave the system perl alone and build your own. Simply download and unpack the source (http://www.perl.org/get.html) and configure it like so:

    ./Configure -des -Dprefix=$HOME/perl make test make install

    Ubuntu uses the the version of perl which ships with the system for some system tasks. IMHO it's best left alone.

    Also you can use the method above to install various builds of perl on your system, should that interest you.

      marto++. I would leave *all* vendor perls (or python, or ruby, or ...) alone. For perl, look into PerlBrew for installing your own version of perl.

      -derby
Re: LWP::UserAgent @ Ubuntu 8.04 64-Bit
by BrowserUk (Pope) on Aug 12, 2010 at 13:56 UTC

    A pure guess. Mime::Base64 is broken on your system. Perhaps because of errors when compiled for 64-bit?

    Try building Mime::Base64 manually and see what it shows?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: LWP::UserAgent @ Ubuntu 8.04 64-Bit
by rowdog (Curate) on Aug 12, 2010 at 16:11 UTC
    sudo aptitude install libwww-perl

    Messing around with cpan can break your system. Either use the package manager to install the Ubuntu (Debian, probably) package and use the dated but stable version or follow marto's fine advice and install your own perl for your own use.

    Update: fixed speling

Re: LWP::UserAgent @ Ubuntu 8.04 64-Bit
by kennethk (Abbot) on Aug 12, 2010 at 13:56 UTC
    Before trying to install anything, you should try the following from the command line:

    perl -MLWP::UserAgent -e 'print "Good!\n"'

    In Ubuntu, there is a version of Perl tightly bound to the OS, and it includes LWP::UserAgent. I'm not certain why, but I believe it is part of the package management system.

    One of the side effects of this is that Ubuntu can be a pain if you need to install modules - before invoking CPAN, I highly recommend you check in apt/aptitude/package management to see if there's an official distribution version of the package you want to install. In order to avoid some real frustrations when there isn't an official distro, I either use a local, user-specific copy of perl or at least local module installs so I don't have to deal with packages installed from multiple sources.

    Update: This thread from the Ubuntu forum seems on-topic.

Re: LWP::UserAgent @ Ubuntu 8.04 64-Bit
by timb (Novice) on Aug 12, 2010 at 17:18 UTC
    Hi guys!
    BIG THANKS to all of you for the fast and competent help! It's quite embarassing how easy it was fixed... sudo aptitude install libwww-perl did the job. Afterwards my script worked fine.
    Well, one never stops learning.
    Wish u the best, greez tiMb

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://854672]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2021-01-23 17:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?