Thread: Use Archive

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Posts
    12
    Rep Power
    0

    Use Archive


    I am trying to archive file and for that used "use Archive::Extract" and "use Archive::Tar"...But while running the script it throws an error "Can't locate Archive.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at test.pl line 1.
    BEGIN failed--compilation aborted at test.pl line 1."....To resolve this I wrote cpan -i Archive..However that also not worked, Please advise, is it because of perl version....For me it is "
    This is perl, v5.8.8 built for x86_64-linux-thread-multi

    Copyright 1987-2006, " Thanks in advance for any help
  2. #2
  3. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,264
    Rep Power
    1810
    I think you just need to be specific. Try:

    Code:
    cpan -i Archive::Extract
    And see what kind of error you get.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Posts
    12
    Rep Power
    0
    Hi Keith,

    I tried cpan -i Archive::Extract, but it is throwing a long error
    "CPAN: Storable loaded ok
    Going to read /root/.cpan/Metadata
    Warning: Found only 0 objects in /root/.cpan/Metadata
    CPAN: LWP::UserAgent loaded ok
    Fetching with LWP:
    http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/authors/01mailrc.txt.gz
    LWP failed with code[500] message[Can't connect to www.cpan.org:80 (connect: Connection timed out)]

    Trying with "/usr/bin/links -source" to get
    http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/authors/01mailrc.txt.gz
    ELinks: Network is unreachable

    System call "/usr/bin/links -source "http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/authors/01mailrc.txt.gz" > /root/.cpan/sources/authors/01mailrc.txt"
    returned status 1 (wstat 256)
    Warning: expected file [/root/.cpan/sources/authors/01mailrc.txt.gz] doesn't exist

    Trying with "/usr/bin/wget -O -" to get
    http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/authors/01mailrc.txt.gz
    --2013-12-15 23:25:10-- http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/authors/01mailrc.txt.gz
    Resolving www.cpan.org... 212.117.177.118, 2a01:608:2:4::2, 2620:101:d000:8::140:1
    Connecting to www.cpan.org|212.117.177.118|:80... failed: No route to host.
    Connecting to www.cpan.org|2a01:608:2:4::2|:80... failed: Network is unreachable.
    Connecting to www.cpan.org|2620:101:d000:8::140:1|:80... failed: Network is unreachable.

    System call "/usr/bin/wget -O - "http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/authors/01mailrc.txt.gz" > /root/.cpan/sources/authors/01mailrc.txt"
    returned status 1 (wstat 256)
    Warning: expected file [/root/.cpan/sources/authors/01mailrc.txt.gz] doesn't exist
    Please check, if the URLs I found in your configuration file
    (http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/)
    are valid. The urllist can be edited. E.g. with 'o conf urllist push
    ftp://myurl/'

    Could not fetch authors/01mailrc.txt.gz
    Fetching with LWP:
    http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/modules/02packages.details.txt.gz
    LWP failed with code[500] message[Can't connect to www.cpan.org:80 (connect: Connection timed out)]

    Trying with "/usr/bin/links -source" to get
    http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/modules/02packages.details.txt.gz
    ELinks: Network is unreachable

    System call "/usr/bin/links -source "http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/modules/02packages.details.txt.gz" > /root/.cpan/sources/modules/02packages.details.txt"
    returned status 1 (wstat 256)
    Warning: expected file [/root/.cpan/sources/modules/02packages.details.txt.gz] doesn't exist

    Trying with "/usr/bin/wget -O -" to get
    http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/modules/02packages.details.txt.gz
    --2013-12-15 23:26:16-- http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/modules/02packages.details.txt.gz
    Resolving www.cpan.org... 212.117.177.118, 2a01:608:2:4::2, 2620:101:d000:8::140:1
    Connecting to www.cpan.org|212.117.177.118|:80... failed: Connection timed out.
    Connecting to www.cpan.org|2a01:608:2:4::2|:80... failed: Network is unreachable.
    Connecting to www.cpan.org|2620:101:d000:8::140:1|:80... failed: Network is unreachable.

    System call "/usr/bin/wget -O - "http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/modules/02packages.details.txt.gz" > /root/.cpan/sources/modules/02packages.details.txt"
    returned status 1 (wstat 256)
    Warning: expected file [/root/.cpan/sources/modules/02packages.details.txt.gz] doesn't exist
    Please check, if the URLs I found in your configuration file
    (http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/)
    are valid. The urllist can be edited. E.g. with 'o conf urllist push
    ftp://myurl/'

    Could not fetch modules/02packages.details.txt.gz
    Fetching with LWP:
    http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/modules/03modlist.data.gz
    LWP failed with code[500] message[Can't connect to www.cpan.org:80 (connect: Connection timed out)]

    Trying with "/usr/bin/links -source" to get
    http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/modules/03modlist.data.gz
    ELinks: Network is unreachable

    System call "/usr/bin/links -source "http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/modules/03modlist.data.gz" > /root/.cpan/sources/modules/03modlist.data"
    returned status 1 (wstat 256)
    Warning: expected file [/root/.cpan/sources/modules/03modlist.data.gz] doesn't exist

    Trying with "/usr/bin/wget -O -" to get
    http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/modules/03modlist.data.gz
    --2013-12-15 23:27:42-- http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/modules/03modlist.data.gz
    Resolving www.cpan.org... 212.117.177.118, 2a01:608:2:4::2, 2620:101:d000:8::140:1
    Connecting to www.cpan.org|212.117.177.118|:80... failed: No route to host.
    Connecting to www.cpan.org|2a01:608:2:4::2|:80... failed: Network is unreachable.
    Connecting to www.cpan.org|2620:101:d000:8::140:1|:80... failed: Network is unreachable.

    System call "/usr/bin/wget -O - "http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/modules/03modlist.data.gz" > /root/.cpan/sources/modules/03modlist.data"
    returned status 1 (wstat 256)
    Warning: expected file [/root/.cpan/sources/modules/03modlist.data.gz] doesn't exist
    Please check, if the URLs I found in your configuration file
    (http://www.cpan.org/modules/by-module/Archive/Archive-Tar-1.48.tar.gz/)
    are valid. The urllist can be edited. E.g. with 'o conf urllist push
    ftp://myurl/'

    Could not fetch modules/03modlist.data.gz
    Going to write /root/.cpan/Metadata
    Warning: Cannot install Archive::Extract, don't know what it is.
    Try the command

    i /Archive::Extract/

    to find objects with matching identifiers."


    What to do now
  6. #4
  7. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,264
    Rep Power
    1810
    Seems like your CPAN is not configured.

    I would try going into the cpan shell as the root user, and then reinitializing.

    Code:
    sudo cpan
    Enter your password. Then at the cpan prompt:

    Code:
    o conf init

IMN logo majestic logo threadwatch logo seochat tools logo