3
votes

I am trying to use a new version of perl - 5.18.1 and I get an error for one of the modules I am trying to use:

/usr/local/perl-5.18.1/bin/perl: symbol lookup error: /home/riskprod/bin/lib/perl5/x86_64-linux-thread-multi/auto/Cwd/Cwd.so: undefined symbol: Perl_Tstack_sp_ptr

I have cpan and use it for my modules. From my research it looks like the reason for the error is that it was built using different version of perl.

How can I change the version of the build? What would be the proper solution to this problem?

Some details

Here is what I have in bash_profile:

export PERL_LOCAL_LIB_ROOT="/home/riskprod/perl5:$PERL_LOCAL_LIB_ROOT";
export PERL_MB_OPT="--install_base "/home/riskprod/perl5"";
export PERL_MM_OPT="INSTALL_BASE=/home/riskprod/perl5";
export PERL5LIB="/home/riskprod/perl5/lib/perl5:$PERL5LIB";
export PATH="/home/riskprod/perl5/bin:$PATH";

Here is how I ran the cpan:

/usr/local/perl-5.18.1/bin/perl -MCPAN -e shell

I did this to reinstall:

force install Cwd
1

1 Answers

2
votes

The module you are trying to use was compiled against a different build of Perl. It's not clear what you did for that to happen. Maybe you set PERL5LIB to point to an directory into which modules were installed using INSTALL_BASE? (Damn you, INSTALL_BASE!) You just need to reinstall the module, but it would also help to stop looking in whatever directory contains the that module.