Perl “Perl_Gthr_key_ptr” problems

33rd Dec 2011Programming, Perl

I just upgraded by laptop to Fedora 16 and started to get problems with Perl libraries that were installed via yum.  Errors along the lines of:

perl: symbol lookup error: /usr/local/lib64/perl5/auto/Crypt/Rijndael/Rijndael.so: undefined symbol: Perl_Gthr_key_ptr

Some research suggest this is caused by the shared library being built against a different version of perl.  This is mainly a problem because Fedora provides a number of prebuild perl libraries through yum.  The fix for this is to use cpan to rebuild the libraries. So as root start cpan:

cpan

Then reinstall the libraries causing problems.  In the above example I did:

force install Crypt::Rijndael

This will recreate the .so file against the correct perl version.

CPAN error with vxs.so

There may be problems with cpan failing due to:

perl: symbol lookup error: /usr/local/lib64/perl5/auto/version/vxs/vxs.so: undefined symbol: PerlGthrkey_ptr

I managed to fix this by just deleting the whole folder:

 /usr/local/lib64/perl5/auto/version/

Apache and selinux

If you are calling perl scripts from apache there might be further problems like:

failed to map segment from shared object: Permission denied at /usr/lib64/perl5/DynaLoader.pm

This is an SE linux issue and can be fixed with chcon:

find /usr/local/lib64/perl5/auto -name “*.so” | xargs -n 1 chcon unconfined_u:object_r:lib_t:s0

3 Comments Comments Feed

  1. Leos (December 20, 2011, 11:28 am).

    Thank you for your kind advise. But unfortunately, the cpan’s “force install Crypt::Rijndael” fails with “…vxs.so: undefined symbol: Perl_Gthr_key_ptr” as well. :( Any trick to get over?

  2. John TE Slade (December 20, 2011, 11:55 am).

    Leos, you should just be able to delete the vxs.so file and cpan will work fine. See the section above “CPAN error with vxs.so”.

  3. Leos (December 20, 2011, 1:12 pm).

    Great! It resolved dependencies again and recreated what missing. Thank you so much!

Add a Comment