Perl “Perl_Gthr_key_ptr” problems

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

  6Comments

  1. Leos   •  

    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   •     Author

    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   •  

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

  4. Stefan M.   •  

    I had a similar issue with an old webserver hosting software.
    instead of deleting the auto folder, I did rename that file which maked issues and it did work and the software was running fine.

    You really rescured me with your post!!

    Thanks Stefan

  5. Kate Yoak   •  

    Oh my. This happened to me as a result of installing git – and dragging its dependencies in…

    Removing the version folder was key to getting off the ground to update all the modules. Thank you!

  6. Altaf Ladhani   •  

    Great advise, worked just fine

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.