in reply to Problem installing missing modules with CPAN::Shell

Unless you've done so I'd start with trivial checks:

Verify CPAN::Debug is accessible when you do
/path/to/perl -e 'use CPAN::Debug'
If more than one version of Perl is installed, use full path for perl command to make sure you're installing the module for the correct version.

Replies are listed 'Best First'.
Re^2: Problem installing missing modules with CPAN::Shell
by sotona (Scribe) on Feb 11, 2015 at 08:53 UTC
    I have only one perl version installed and when I do /usr/bin/perl -e "use CPAN::Debug" or /usr/bin/perl -MCPAN::Debug -e "print 1" everything is ok
    Sapienti sat.
Re^2: Problem installing missing modules with CPAN::Shell
by sotona (Scribe) on Feb 12, 2015 at 17:18 UTC
    Well, I tried literally everything, including complete de- and re-installation of perl (and "rm -rf" of leftovers) but it did not help.

    Looks like a bug?

    Sapienti sat.

      Well, I tried literally everything, including complete de- and re-installation of perl (and "rm -rf" of leftovers) but it did not help.

      Looks like a bug?

      No. Looks like user error.

      Try this, get https://cpan.metacpan.org/authors/id/A/AN/ANDK/CPAN-2.05.tar.gz, untar it and install it

      Then try running ... and if it fails post the full error message including output of perl -V

        [rum-mad-adtsrv-01] # perl -v This is perl 5, version 20, subversion 1 (v5.20.1) built for x86_64-li +nux Copyright 1987-2014, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge. [rum-mad-adtsrv-01] # ./cpan.pl Can't locate package CPAN::Debug for @CPAN::Shell::ISA at ./cpan.pl li +ne 7. Can't call method "exists" on an undefined value at /usr/lib/perl5/5.2 +0.1/CPAN/Shell.pm line 1471.


        test script is:

        #!/usr/bin/perl use strict; use warnings; use CPAN::Shell; CPAN::Shell->install('Image::Size');
        Sapienti sat.