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

Hi all -- My Cpan was broken, so I ended up re-installing it (with yum). Well, apparently something went horribly wrong, b/c now my Cpan won't even start up.
>sudo cpan >Can't locate CPAN/Exception/yaml_process_error.pm in @INC (@INC conta +ins: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/v +endor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/p +erl5 /home/usrmfi/.cpan/CPAN) at /usr/local/share/perl5/CPAN.pm line +40. BEGIN failed--compilation aborted at /usr/local/share/perl5/CPAN.pm li +ne 40. Compilation failed in require at /usr/bin/cpan line 175. BEGIN failed--compilation aborted at /usr/bin/cpan line 175.
> perl -MCPAN -e shell >Can't locate CPAN/Exception/yaml_process_error.pm in @INC (@INC conta +ins: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/v +endor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/p +erl5 /home/usrmfi/.cpan/CPAN) at /usr/local/share/perl5/CPAN.pm line +40. BEGIN failed--compilation aborted at /usr/local/share/perl5/CPAN.pm li +ne 40. Compilation failed in require. BEGIN failed--compilation aborted.
> yum list | grep -i CPAN > perl-CPAN.x86_64 1.9402-136.el6_6.1 + @updates perl-CPANPLUS.x86_64 0.88-136.el6_6.1 u +pdates perl-Parse-CPAN-Meta.x86_64 1:1.40-136.el6_6.1 u +pdates perl-Test-CPAN-Meta.noarch 0.13-1.el6 b +ase
I have googled far and wide for someone with an issue like this but was not able to find a similar issue (at least with a resolution that solved my issue). I have re-installed perl and cpan a couple times (with yum) now but that has not done anything to change or fix the issue. I still have this same error.

Replies are listed 'Best First'.
Re: CPAN/Perl Broken
by marto (Cardinal) on Jan 07, 2015 at 16:09 UTC

    When you reinstalled perl and cpan, did you do this via your OS package management tool? Version 1.9402 didn't include Exception::yaml_process_error.pm. This was introduced (I believe) in 1.9800. With regards to the system perl, it's best to leave it alone and install your own perl elsewhere on the system, but we can get to that later.

    Update: fixed typo.

      I used >sudo yum reinstall perl >sudo yum reinstall perl-CPAN

        Sorry, I should have asked, what is the output of perl -v?