Hello,

Here is the script:

#!/usr/bin/perl use strict; use warnings; use CGI; use CPAN; use CPAN::Config; $CPAN::Config->{'build_dir'} = q[/home/rohan/.cpan/build]; $CPAN::Config->{'cpan_home'} = q[/home/rohan/.cpan]; $CPAN::Config->{'histfile'} = q[/home/rohan/.cpan/histfile]; $CPAN::Config->{'keep_source_where'} = q[/home/rohan/.cpan/sources]; $CPAN::Config->{'makepl_arg'} = q[PREFIX=/home/rohan/perllib LIB=home/ +rohan/perllib/lib/pe rl5]; my $q = CGI->new; print $q->header("text/plain"); CPAN::Shell->install("MP3::Tag");

Both, /home/rohan/.cpan and /home/rohan/perllib are owned and writable by user apache.

This is the output on the browser:

CPAN: Storable loaded ok
Going to read /home/rohan/.cpan2/Metadata
  Database was generated on Tue, 29 Mar 2005 09:53:28 GMT
Running install for module MP3::Tag
Running make for I/IL/ILYAZ/modules/MP3-Tag-0.94.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for /home/rohan/.cpan2/sources/authors/id/I/IL/ILYAZ/modules/MP3-Tag-0.94.tar.gz ok
Scanning cache /home/rohan/.cpan2/build for sizes
Uncompressed /home/rohan/.cpan2/sources/authors/id/I/IL/ILYAZ/modules/MP3-Tag-0.94.tar.gz successfully
Using Tar:/bin/tar xvf /home/rohan/.cpan2/sources/authors/id/I/IL/ILYAZ/modules/MP3-Tag-0.94.tar:
Couldn't untar /home/rohan/.cpan2/sources/authors/id/I/IL/ILYAZ/modules/MP3-Tag-0.94.tar
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>200 OK</title>
</head><body>

OK

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


<address>Apache/2.0.52 (Fedora) Server at 127.0.0.1 Port 80</address> </body></html>

As seen, I think the CPAN stuff gets initialized properly. All the necessary files are created in /home/rohan/.cpan. I guess there is some problem during the untar. I just can't seem to get it!


In reply to Re^2: using CPAN through web by arc_of_descent
in thread using CPAN through web by arc_of_descent

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.