Posted on

weaken … XS version of Scalar::Util

weaken is only available with the XS version of Scalar::Util

Every time we upgrade Perl on our CentOS box we get this message.  The fix is very simple .  Re-install Scalar::Util via CPAN.  For some reason the bindings are not updated and the proper version needs to be re-registered with the Perl modules directory.

The command sequence you need to run to restore the Scalar::Util functionality is..

cpan
> force install Scalar::Util

The simple command line cpan -i Scalar::Util will not do the trick.  If you already have Scalar::Util installed this command will skip the installation telling you so.

You will also find references online to needing to install perl-Task-Weaken.  That did nothing for us.

Since this is the third time this has happened on our development server running CentOS 5, we figured we’d post it here and maybe help someone else out.  If nothing else we’ll remember what we did in 10 less Google searches next time around!

12 thoughts on “weaken … XS version of Scalar::Util

  1. Hey thanks a lot for the quick fix!

  2. Great Solution !!

  3. Thanks for the great solution! I’ve already filed this. :)

  4. Really clear and useful.

  5. Worked for me, thanks for the solution.

  6. Thank you thank you! This just fixed our production automation box.

  7. Thank you – I knew I’d already fixed this once but I couldn’t remember how.

  8. The first two times this happened all I could find was a Japanese website about it. Your post was a valuable resource to remind me what to do when it happened the third time! Thanks!

  9. This issue was very frustrating to me and your fix worked for me as well! After performing your step, I had to do a cpan upgrade (perl -MCPAN -e ‘CPAN::Shell->install(CPAN::Shell->r)’) to fix some additional issues related to crypto in one of my scripts, but that seems to be very specific to my situation.

    Thanks!

  10. You just saved my butt.

  11. I just like to thank you for this post because this is nth time I came across the problem – and end up at this solution from Google – and it works beautifully!

  12. Thanks for the tip. Got this error on a Cent 6 server and this procedure fixed the problem perfectly within 2 minutes.

Comments are closed.