Discussion:
cpan failing to install module
(too old to reply)
Asif Iqbal
2009-06-24 16:06:39 UTC
Permalink
# cpan IO::Socket::SSL
CPAN: Storable loaded ok (v2.18)
Going to read '/var/spool/cpan/sources/authors/01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.015)
CPAN: YAML loaded ok (v0.68)
Going to read 1 yaml file from /var/spool/cpan/
CPAN: Time::HiRes loaded ok (v1.9719)
Can't call method "tested_ok_but_not_installed" on unblessed reference
at /usr/share/perl/5.10/CPAN/Index.pm line 180.

# vi +180 /usr/share/perl/5.10/CPAN/Index.pm
[..]
if ($do->tested_ok_but_not_installed) {
$CPAN::META->is_tested($do->{build_dir},$do->{make_test}{TIME});
}
[..]

# cpan -v
/usr/local/bin/cpan script version 1.9, CPAN.pm version 1.94

# perl -v
This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi

# uname -a
Linux ubuntu.example.net 2.6.28-13-generic #44-Ubuntu SMP Tue Jun 2
07:55:09 UTC 2009 x86_64 GNU/Linux

Any suggestion how to get around it?
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Andreas J. Koenig
2009-06-25 02:50:13 UTC
Permalink
Post by Asif Iqbal
# cpan IO::Socket::SSL
CPAN: Storable loaded ok (v2.18)
Going to read '/var/spool/cpan/sources/authors/01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.015)
CPAN: YAML loaded ok (v0.68)
Going to read 1 yaml file from /var/spool/cpan/
CPAN: Time::HiRes loaded ok (v1.9719)
Can't call method "tested_ok_but_not_installed" on unblessed reference
at /usr/share/perl/5.10/CPAN/Index.pm line 180.
What is in /var/spool/cpan/ ? If it is looks like being left over by
CPAN.pm please send it to me. As a workaround I suggest removing "it"
if possible.
--
andreas
Asif Iqbal
2009-06-26 14:41:50 UTC
Permalink
On Wed, Jun 24, 2009 at 10:50 PM, Andreas J.
 > # cpan IO::Socket::SSL
 > CPAN: Storable loaded ok (v2.18)
 > Going to read '/var/spool/cpan/sources/authors/01mailrc.txt.gz'
 > CPAN: Compress::Zlib loaded ok (v2.015)
 > CPAN: YAML loaded ok (v0.68)
 > Going to read 1 yaml file from /var/spool/cpan/
 > CPAN: Time::HiRes loaded ok (v1.9719)
 > Can't call method "tested_ok_but_not_installed" on unblessed reference
 > at /usr/share/perl/5.10/CPAN/Index.pm line 180.
What is in /var/spool/cpan/ ? If it is looks like being left over by
CPAN.pm please send it to me. As a workaround I suggest removing "it"
if possible.
# ls -al /var/spool/cpan/
total 11652
drwxr-xr-x 7 root root 4096 2009-06-26 10:40 .
drwxr-xr-x 5 root root 4096 2009-06-23 17:56 ..
drwxr-xr-x 5 root root 4096 2009-06-24 14:53 CPAN-DistnameInfo-0.08-EIEXh8
-rw-r--r-- 1 root root 1257 2009-06-24 14:53
CPAN-DistnameInfo-0.08-EIEXh8.yml
-rw-r--r-- 1 root root 3718 2009-06-26 10:40 FTPstats.yml
drwxr-xr-x 9 root root 4096 2009-06-24 14:52 IO-Socket-SSL-1.24-DX8M6X
-rw-r--r-- 1 root root 1269 2009-06-24 14:59 IO-Socket-SSL-1.24-DX8M6X.yml
-rw-r--r-- 1 root root 11865882 2009-06-24 14:52 Metadata
drwxr-xr-x 4 root root 4096 2009-06-25 10:58 Net-LDAPapi-3.0.3-JXvR9d
-rw-r--r-- 1 root root 995 2009-06-25 10:58 Net-LDAPapi-3.0.3-JXvR9d.yml
drwxr-xr-x 7 root root 4096 2009-06-24 14:56 Net-SSLeay-1.35-t0mlbR
-rw-r--r-- 1 root root 1008 2009-06-24 14:54 Net-SSLeay-1.35-t0mlbR.yml
drwxr-xr-x 4 root root 4096 2009-06-24 14:52 sources
--
andreas
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Asif Iqbal
2009-06-27 03:22:57 UTC
Permalink
On Fri, Jun 26, 2009 at 9:44 PM, Andreas J.
 > On Wed, Jun 24, 2009 at 10:50 PM, Andreas J.
 >> What is in /var/spool/cpan/ ? If it is looks like being left over by
 >> CPAN.pm please send it to me. As a workaround I suggest removing "it"
 >> if possible.
 > # ls -al /var/spool/cpan/
 > total 11652
 > drwxr-xr-x 7 root root     4096 2009-06-26 10:40 .
 > drwxr-xr-x 5 root root     4096 2009-06-23 17:56 ..
 > drwxr-xr-x 5 root root     4096 2009-06-24 14:53 CPAN-DistnameInfo-0.08-EIEXh8
 > -rw-r--r-- 1 root root     1257 2009-06-24 14:53
 > CPAN-DistnameInfo-0.08-EIEXh8.yml
 > -rw-r--r-- 1 root root     3718 2009-06-26 10:40 FTPstats.yml
Thank you, this is it. It's not expected to have unrelated yaml files
in the build directory. You can try to get away with the patch below
or isolate the build directory from other directories within ~/.cpan/.
I would expect that not having a dedicated build directory has more
inherent risks, so better you run
 o conf init build_dir
excellent! that worked

# perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.94)
ReadLine support available (maybe install Bundle::CPAN or Bundle::CPANxxl?)

cpan[1]> o conf init build_dir


The following questions are intended to help you with the
configuration. The CPAN module needs a directory of its own to cache
important index files and maybe keep a temporary mirror of CPAN files.
This may be a site-wide or a personal directory.

<build_dir>
Directory where the build process takes place? [/var/spool/cpan] /var/run/cpan



Please remember to call 'o conf commit' to make the config permanent!


cpan[2]> o conf commit
commit: wrote '/etc/perl/CPAN/Config.pm'

cpan[3]> exit
Terminal does not support GetHistory.
Lockfile removed.

# cpan IO::Socket::SSL
CPAN: Storable loaded ok (v2.18)
Going to read '/var/spool/cpan/sources/authors/01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.015)
CPAN: YAML loaded ok (v0.68)
............................................................................DONE
CPAN: LWP::UserAgent loaded ok (v5.819)
CPAN: Time::HiRes loaded ok (v1.9719)
Fetching with LWP:
http://www.perl.org/CPAN/modules/02packages.details.txt.gz
Going to read '/var/spool/cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Fri, 26 Jun 2009 22:27:03 GMT
............................................................................DONE
Fetching with LWP:
http://www.perl.org/CPAN/modules/03modlist.data.gz
Going to read '/var/spool/cpan/sources/modules/03modlist.data.gz'
............................................................................DONE
Going to write /var/spool/cpan/Metadata
IO::Socket::SSL is up to date (1.24).

#
and choose a new, empty build directory instead of the old one.
Something like this patch will eventually be applied to the sources to
prevent future accidents like yours.
--- a/lib/CPAN/Index.pm
+++ b/lib/CPAN/Index.pm
@@ -146,7 +146,7 @@ sub reanimate_build_dir {
            next DISTRO;
        }
        my $c = $y->[0];
-        if ($c && CPAN->_perl_fingerprint($c->{perl})) {
+        if ($c && $c->{perl} && CPAN->_perl_fingerprint($c->{perl})) {
            my $key = $c->{distribution}{ID};
            for my $k (keys %{$c->{distribution}}) {
                if ($c->{distribution}{$k}
Thanks for the report,
--
andreas
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Andreas J. Koenig
2009-06-27 01:44:43 UTC
Permalink
Post by Asif Iqbal
On Wed, Jun 24, 2009 at 10:50 PM, Andreas J.
Post by Andreas J. Koenig
What is in /var/spool/cpan/ ? If it is looks like being left over by
CPAN.pm please send it to me. As a workaround I suggest removing "it"
if possible.
# ls -al /var/spool/cpan/
total 11652
drwxr-xr-x 7 root root 4096 2009-06-26 10:40 .
drwxr-xr-x 5 root root 4096 2009-06-23 17:56 ..
drwxr-xr-x 5 root root 4096 2009-06-24 14:53 CPAN-DistnameInfo-0.08-EIEXh8
-rw-r--r-- 1 root root 1257 2009-06-24 14:53
CPAN-DistnameInfo-0.08-EIEXh8.yml
-rw-r--r-- 1 root root 3718 2009-06-26 10:40 FTPstats.yml
Thank you, this is it. It's not expected to have unrelated yaml files
in the build directory. You can try to get away with the patch below
or isolate the build directory from other directories within ~/.cpan/.
I would expect that not having a dedicated build directory has more
inherent risks, so better you run

o conf init build_dir

and choose a new, empty build directory instead of the old one.

Something like this patch will eventually be applied to the sources to
prevent future accidents like yours.

--- a/lib/CPAN/Index.pm
+++ b/lib/CPAN/Index.pm
@@ -146,7 +146,7 @@ sub reanimate_build_dir {
next DISTRO;
}
my $c = $y->[0];
- if ($c && CPAN->_perl_fingerprint($c->{perl})) {
+ if ($c && $c->{perl} && CPAN->_perl_fingerprint($c->{perl})) {
my $key = $c->{distribution}{ID};
for my $k (keys %{$c->{distribution}}) {
if ($c->{distribution}{$k}


Thanks for the report,
--
andreas
Asif Iqbal
2009-06-26 14:44:05 UTC
Permalink
On Wed, Jun 24, 2009 at 10:50 PM, Andreas J.
 > # cpan IO::Socket::SSL
 > CPAN: Storable loaded ok (v2.18)
 > Going to read '/var/spool/cpan/sources/authors/01mailrc.txt.gz'
 > CPAN: Compress::Zlib loaded ok (v2.015)
 > CPAN: YAML loaded ok (v0.68)
 > Going to read 1 yaml file from /var/spool/cpan/
 > CPAN: Time::HiRes loaded ok (v1.9719)
 > Can't call method "tested_ok_but_not_installed" on unblessed reference
 > at /usr/share/perl/5.10/CPAN/Index.pm line 180.
What is in /var/spool/cpan/ ? If it is looks like being left over by
CPAN.pm please send it to me. As a workaround I suggest removing "it"
if possible.
removed the content of /var/spool/cpan and still same error

(root)@sys-ubuntu:/var/spool/cpan# rm -rf *
(root)@sys-ubuntu:/var/spool/cpan# cd
(root)@sys-ubuntu:~# cpan IO::Socket::SSL
CPAN: Storable loaded ok (v2.18)
CPAN: LWP::UserAgent loaded ok (v5.819)
CPAN: Time::HiRes loaded ok (v1.9719)
Fetching with LWP:
http://www.perl.org/CPAN/authors/01mailrc.txt.gz
CPAN: YAML loaded ok (v0.68)
Going to read '/var/spool/cpan/sources/authors/01mailrc.txt.gz'
Going to read 1 yaml file from /var/spool/cpan/
Can't call method "tested_ok_but_not_installed" on unblessed reference
at /usr/share/perl/5.10/CPAN/Index.pm line 180.
(root)@sys-ubuntu:~# ls -al /var/spool/cpan/
total 16
drwxr-xr-x 3 root root 4096 2009-06-26 10:42 .
drwxr-xr-x 5 root root 4096 2009-06-23 17:56 ..
-rw-r--r-- 1 root root 307 2009-06-26 10:42 FTPstats.yml
drwxr-xr-x 3 root root 4096 2009-06-26 10:42 sources
--
andreas
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Loading...