9

I'm trying to run a Perl script, but it is returning:

/usr/bin/perl: symbol lookup error: /usr/local/groundwork/perl/lib/5.8.8/x86_64-linux-thread-multi/auto/IO/IO.so: undefined symbol: Perl_Tstack_sp_ptr

Is there any way to determine what Perl module is causing this?

Chankey Pathak
  • 21,187
  • 12
  • 85
  • 133
Connor
  • 93
  • 1
  • 1
  • 3

4 Answers4

18

IO.so is the binary component of IO. The modules of this distribution are also part of the perl distribution (i.e. they are dual-lived).

This type of error usually occurs when using a binary compiled using one version of Perl is used by a different version of Perl.

ikegami
  • 367,544
  • 15
  • 269
  • 518
  • 2
    Thanks. 'twas indeed the problem. The shebang at the top of the script was pointed at the wrong perl. – Connor Jun 08 '11 at 14:18
  • It could be the other way around too: a binary from an older version being used by a more recent version of Perl. For example, manually copying some binaries from CentOS 6 to CentOS 7 (which uses a higher version of Perl). – Nagev Jan 31 '17 at 17:30
  • Fixed . . . . . – ikegami Jan 31 '17 at 17:35
2

I ran into this problem recently when I had a PERL5LIB environment variable defined in my login files, but they were pointing to a directory that was incompatible with the system-installed perl. This happened because the HOME filesystem is cross-mounted on lots of different machines where the perl installations are heterogenous. Deleting the environment variable solves the problem, and I'll find a better way to manage local libraries.

Ken Williams
  • 22,756
  • 10
  • 85
  • 147
1

I have similar problem many times when I use old perl Module on new CentOS (for example CentOS 6.4).

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

/usr/bin/perl: symbol lookup error: /home/sonnn/perl5/lib/perl5/x86_64-linux-thread-multi/auto/version/vxs/vxs.so: undefined symbol: Perl_Tstack_sp_ptr

I have resolved these problems by:

  • Download sources code of Cwd, version from http://search.cpan.org/ and re-install them

      # tar -xzf version-0.9906.tar.gz
      # cd version-0.9906
      # perl Makefile.PL INSTALL_BASE=/home/sonnn/perl5/
      # make
      # make install
    
      (If you use default module path, you can omit "INSTALL_BASE=/home/sonnn/perl5/")
    
  • Do similarly for other modules

In your case, I think you can download IO module from http://search.cpan.org/ and re-install it.

Greg Dubicki
  • 5,983
  • 3
  • 55
  • 68
Son Nguyen
  • 195
  • 1
  • 10
  • 1
    I just had exactly the same "vxs" error that you posted. An alternative is to use: "cpanm version" and "cpanm DBI" (DBI was the module that was having trouble). I think that is easier than installing the module manually. – Arthur Accioly Nov 26 '16 at 17:54
-2

Edit:

Finally, even though I know it's not answering the question, i permit myself as it looks like really hard information to get, because I found a bunch of sites mentioning these errors, but very few with consistent solutions in it. Well that's it.

I couldn't process the zimbra migration I had to do before changing the platforms path. We have done it going from Ubuntu 8.04 with Zimbra 6.0.16 then Zimbra 7.2.7, migrating to Ubuntu 10.04, then upgrading Zimbra 8.0.9, then migrating to Centos 7 then upgrading to 8.6.0

On Centos where i had to do a move of the zimbramon files after I did ./install.sh -s ...

mv /opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi/ /opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi.bak

Then i ran again the install.sh without -s

Félix
  • 1
  • 1