LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-02-2009, 03:52 PM   #1
reticent
LQ Newbie
 
Registered: Sep 2009
Posts: 16

Rep: Reputation: 0
issues with cpan perl modules


Hey Guys,

I'm trying to install some modules using cpan (for perl) and are having all sorts of issues. In particular, it seems to be complaining about the untar process:

Code:
cpan[1]> install LWP
CPAN: Storable loaded ok (v2.18)
Going to read '/root/.cpan/Metadata'
  Database was generated on Tue, 01 Dec 2009 23:39:08 GMT
Running install for module 'LWP'
CPAN: Data::Dumper loaded ok (v2.121_14)
'YAML' not installed, falling back to Data::Dumper and Storable to read prefs '/root/.cpan/prefs'
Running make for G/GA/GAAS/libwww-perl-5.834.tar.gz
CPAN: Digest::SHA loaded ok (v5.45)
CPAN: Compress::Zlib loaded ok (v2.008)
Checksum for /root/.cpan/sources/authors/id/G/GA/GAAS/libwww-perl-5.834.tar.gz ok
............................................................................DONE
CPAN: Archive::Tar loaded ok (v1.38)
Will not use Archive::Tar, need 1.00
Uncompressed /root/.cpan/sources/authors/id/G/GA/GAAS/libwww-perl-5.834.tar.gz successfully
Using Tar:/bin/tar xvf "libwww-perl-5.834.tar":
Couldn't untar libwww-perl-5.834.tar
CPAN: File::Temp loaded ok (v0.18)
CPAN: Time::HiRes loaded ok (v1.9711)
Package seems to come without Makefile.PL.
  (The test -f "/root/.cpan/build/GAAS-obLMip/Makefile.PL" returned false.)
  Writing one on our own (setting NAME to LWP)
Warning (usually harmless): 'YAML' not installed, will not store persistent state
  Had problems unarchiving. Please build manually
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Failed during this command:
 GAAS/libwww-perl-5.834.tar.gz                : unwrapped NO -- untar failed
It seems to suggest that the untar process completes, but checking /root/.cpan/sources/authors/id/G/GA/GAAS/ shows the tgz intact, and not extracted as the message might suggest.

I've looked all over the net for this one, a few people have referenced the error, but there are no definitive answers. Any help would be appreciated (As solving dependencies by manually downloading all the modules is a right pain the the ass!).

Cheers
 
Old 12-02-2009, 04:20 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Is build-essential installed?

or instead of mucking with CPAN, apt-get install libwww-perl?
 
Old 12-02-2009, 04:26 PM   #3
reticent
LQ Newbie
 
Registered: Sep 2009
Posts: 16

Original Poster
Rep: Reputation: 0
yep, build-essential is installed.

I'm a little reluctant to go down the pre-packaged perl modules path unless they have _every_ module as deb packages. I don't want to get in a situation where im using some packages and some modules I've compiled myself...it gets rather messy quickly.

Using cpan is the ideal solution for me, so I'd prefer to get that working If I can.
 
Old 12-02-2009, 06:26 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Certain perl modules can confuse the cpan shell.
Usually module updates and module dependencies
will be installed too by cpan.

Which Linux are you using ?
Like Ubuntu 9.10 , CentOS 5.x etc.
 
Old 12-02-2009, 06:42 PM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
We're in the Debian forum, so I assume Debian.

I've always avoided CPAN because it's never worked well for me.
 
Old 12-02-2009, 07:38 PM   #6
bartonski
Member
 
Registered: Jul 2006
Location: Louisville, KY
Distribution: Fedora 12, Slackware, Debian, Ubuntu Karmic, FreeBSD 7.1
Posts: 443
Blog Entries: 1

Rep: Reputation: 48
Ok, stupid question, but have you tried this?

Code:
cpan[1]> get LWP
That should try to download and untar, but I'm guessing that if it can't it will leave the tar file out there... then you can try untarring by hand, and see why it's failing.
 
Old 12-03-2009, 04:03 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
perl -e 'foreach (@INC){ system("find $_ -name *.pm") }' | grep LWP.pm
or
Code:
perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \ 'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC' | grep LWP
A missing LWP.pm > # apt-get install libwww-perl

.....
 
Old 12-03-2009, 11:00 PM   #8
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,883
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
If the perl module you need isn't in an official repo you can check http://debian.pkgs.cpan.org/ , it usually works better than trying to build the modules yourself.

Or try take look at Building Debian packages of Perl modules - http://www.debian-administration.org/articles/78
 
Old 12-04-2009, 04:46 PM   #9
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Do you have tar installed? From the failure there is a potential that /bin/tar either doesn't exist or is a link pointing to a bad spot.
 
Old 12-07-2009, 02:12 PM   #10
reticent
LQ Newbie
 
Registered: Sep 2009
Posts: 16

Original Poster
Rep: Reputation: 0
The error isn't specific to LWP, any module I try fails with the same reasons. Entering the directory where its working (/root/.cpan/sources/authors/id/G/GA/GAAS/) shows the file which has not been extracted despite 'extracted successfully'. tar is definitely installed

I ended up just using debian modules as it turns out the one I was after was included in their repo's.

It'd still be nice to know why cpan doesnt work, but I suppose it's really for my own interest now. A quick google seems to suggest i'm not the only one with the issue (no solutions though).
 
Old 12-07-2009, 04:36 PM   #11
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Using Tar:/bin/tar xvf "libwww-perl-5.834.tar":
Couldn't untar libwww-perl-5.834.tar


That's the problem, it doesn't even get a chance to compile, the untar is failing, your tar is busted or your out of space in the directory its untarring in
 
Old 12-08-2009, 03:15 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
*

# apt-get install perl-dev perl-modules

'perl-modules' provides ' Tar.pm '.


.....

Last edited by knudfl; 12-08-2009 at 12:11 PM.
 
Old 01-29-2011, 07:30 AM   #13
bananadog
LQ Newbie
 
Registered: Jan 2011
Posts: 1

Rep: Reputation: 0
Check kernel memory

I had the same problem on a VM. The problem was a quota on the kernel memory. As a first shot shut down all services not needed (Database, Webserver,....) and try again.
 
  


Reply

Tags
cpan, perl



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Download CPAN perl modules separately? kenneho Linux - Software 1 10-14-2009 10:22 AM
CPAN and PERL Modules metallica1973 Programming 4 02-01-2008 09:14 PM
load perl CPAN modules sailu_mvn Linux - Software 1 04-18-2006 07:31 PM
perl modules problems CPAN tardigrade Linux - Software 6 09-02-2004 12:29 PM
Canīt download perl modules with cpan emilioestevezz Linux - Networking 1 08-25-2004 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration