linuxperlyumpadre

A mess with different Perl installs


I tried to upgrade Perl and put my computer into a complete mess I am currently running RHEL6.5, 64bits, and this is the thing:

... and the mess begins!

I give up about Padre, and deleted the files related to it, as well as the perl installed on my home dir, however a couple of perl scripts that I had already coded now are throwing errors like:

perl -cw "xmltest.pl" (in directory: /home/myid/scripts/xmltest.pl)
perl: symbol lookup error: /usr/lib64/perl5/auto/Data/Dumper/Dumper.so: undefined symbol: Perl_Istack_sp_ptr
Compilation failed.

... and Data::Dumper in not the only one ... every time I disable one of the modules, another one hangs in the same, or similar way

From what I read about this, seems that this issue is related to modules that were originally installed for one perl version, and are being called by another, however, I already forced the modules that I use to be reinstalled directly from CPAN, and they still failing

Question: How can I, safely, get free from this current perl installs, and perform a new clean install be able to use it w/o these versions conflicts?

My major concern are about the numerous apps that I have that depends on Perl, and I my not broke then on a uninstall

Any help will be much appreciate.


Solution

  • You should:

    1. cleanup

      • clean (comment out) your ~/.profile from any unwanted paths, and so on
      • clean any new perl installation from your $HOME (move to safe place for sure)
      • in short, try return your environment into previous working state
    2. relog, (logout, login)

    3. repair your system perl. Thats mean,

      • read @Sam Varshavchik's answer
      • reinstall it from your distribution, using your package manager (5.10).
      • this step should overwrite the mess you caused.
      • test it !
      • don't continue until youre ensured, everything working right as before.

    Lesson learned: never overwrite your system perl

    1. learning

    2. installing perlbrew

      • run the installation command \wget -O - http://install.perlbrew.pl | bash
      • should finished without errors
      • follow the instructions how to modify your startup file e.g. ~/.profile or such... (you need to add one line to the end)
      • check your ~/perl5/perlbrew/bin should contain prelbrew and patchperl
    3. relog

    4. setup new perl, run

      • perlbrew init #init environment
      • perlbrew available #show what perl you can install
      • perlbrew install 5.20.0 #will take few minutes - depends on your system speed
      • perlbrew install-cpanm
      • perlbrew list #check
      • perlbrew switch perl-5.20.0 #activate newly installed perl 5.20

    Check your installation

    You're done.

    1. CPAN modules

    You can install new modules with cpanm, like:

    Check the ~/perl5/perlbrew/perls/perl-5.20.0/bin/ for new commands

    You will need update your own perl script's shebang line to

    #!/usr/bin/env perl
    

    I hope don't forget anything, maybe other more experienced perl-gurus will add/edit/correct more.

    Anyway, in the reality the steps 5,6,7 are much easier as sounds (by reading this) and could be done in few minutes.