resolving perl_Gthr_key_ptr error

Warning - Old Content

This post is quite old, and it might not apply anymore, or maybe there's a better way to do the same thing nowadays. Take with a big grain of salt.

I’m trying to install a new perl module using cpanm, and the install was failing with an error on one of the dependencies (Class::Accessor::Lvalue, specifically). The exact error was:

symbol lookup error Want.so undefined symbol “Perl_Gthr_key_ptr”

It turns out that I had a locally installed cpan module in ~/local/lib that needed to be re-built. The key item in the above error is “Want.so” - I opened a new terminal and reinstalled the “Want” module:

cpanm Want

That rebuilt the offending module, and allowed me to get on with what I was trying to do. You could get this error from almost any module, but the technique should work for any of them.