http://qs1969.pair.com?node_id=1213862

chexmix has asked for the wisdom of the Perl Monks concerning the following question:

Hallo Fellow Monks,

I'm trying to get back to being a reasonably effective Perl user at work, which is difficult since much of my work lately has involved, well ... other things.

I've installed my own local copy of perlbrew (so as to have a Perl playground) and I've got a number of Perl versions installed underneath that. Now, perhaps I've forgotten something vital, but I feel anyway as though weird things are happening when I try to install modules with cpanm. I've been getting a lot of this sort of thing lately:

bash-4.1$ cpanm Getopt::Lucid; --> Working on Getopt::Lucid Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Getopt-Lucid-1.0 +8.tar.gz ... OK Configuring Getopt-Lucid-1.08 ... OK ==> Found dependencies: Exception::Class::TryCatch --> Working on Exception::Class::TryCatch Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Exception-Class- +TryCatch-1.13.tar.gz ... OK Configuring Exception-Class-TryCatch-1.13 ... OK Building and testing Exception-Class-TryCatch-1.13 ... OK Successfully installed Exception-Class-TryCatch-1.13 ! Installing the dependencies failed: Module 'Exception::Class::TryCat +ch' is not installed ! Bailing out the installation for Getopt-Lucid-1.08. 1 distribution installed bash-4.1$ cpanm Exception::Class::TryCatch; --> Working on Exception::Class::TryCatch Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Exception-Class- +TryCatch-1.13.tar.gz ... OK Configuring Exception-Class-TryCatch-1.13 ... OK Building and testing Exception-Class-TryCatch-1.13 ... OK Successfully installed Exception-Class-TryCatch-1.13 1 distribution installed bash-4.1$ cpanm Getopt::Lucid; --> Working on Getopt::Lucid Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Getopt-Lucid-1.0 +8.tar.gz ... OK Configuring Getopt-Lucid-1.08 ... OK ==> Found dependencies: Exception::Class::TryCatch --> Working on Exception::Class::TryCatch Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Exception-Class- +TryCatch-1.13.tar.gz ... OK Configuring Exception-Class-TryCatch-1.13 ... OK Building and testing Exception-Class-TryCatch-1.13 ... OK Successfully installed Exception-Class-TryCatch-1.13 ! Installing the dependencies failed: Module 'Exception::Class::TryCat +ch' is not installed ! Bailing out the installation for Getopt-Lucid-1.08. 1 distribution installed

Unless I'm being very stupid, that's me trying to install Getopt::Lucid, with cpanm finding a dependency (Exception::Class::TryCatch) and installing it (apparently successfully) then failing because it can't find that same dependency -- after which I install the dependency by itself, which succeeds (again); however, when I then try to install Getopt::Lucid, the install fails again because of the same dependency which I thought I had successfully installed (perhaps twice).

It could be that I'm just tired, but what could be wrong here? The behavior does not make sense to me.

A tired old f*rt,

Glenn

Replies are listed 'Best First'.
Re: flummoxed by cpanm behavior (re: dependencies
by 1nickt (Canon) on Apr 30, 2018 at 19:37 UTC

    Hi, are you doing source ~/perl5/perlbrew/etc/bashrc at the end of your .bash_profile? You can check your config by examining your $PATH which should point to your perlbrew's bin before the system ones. Mine is like:

    $ echo $PATH /Users/1nickt/.perlbrew/libs/perl-5.26.1@dev/bin:/Users/1nickt/perl5/p +erlbrew/bin:/Users/1nickt/perl5/perlbrew/perls/perl-5.26.1/bin:/usr/l +ocal/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin

    Hope this helps!

    The way forward always starts with a minimal test.
Re: flummoxed by cpanm behavior (re: dependencies
by stevieb (Canon) on Apr 30, 2018 at 19:04 UTC

    Did you do a perlbrew install-cpanm?

      I don't recall explicitly in re: this particular Perl (it was installed a couple of years back), but that's how I've always done it ...

Re: flummoxed by cpanm behavior (re: dependencies
by Anonymous Monk on Apr 30, 2018 at 21:35 UTC
    Old buggy version?