News & Info

Daily Updates and Tech Chatter

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..

> 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!

Tags: , , ,

12 Awesome Comments So Far

Don't be a stranger, join the discussion by leaving your own comment
  1. zachary
    January 3, 2012 at 2:26 PM #

    Hey thanks a lot for the quick fix!

  2. Luis Chiang
    January 4, 2012 at 11:34 AM #

    Great Solution !!

  3. Walt Wyndroski
    January 7, 2012 at 11:46 AM #

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

  4. Stéphanie Lanthier
    January 11, 2012 at 9:53 AM #

    Really clear and useful.

  5. Bill
    January 14, 2012 at 7:13 PM #

    Worked for me, thanks for the solution.

  6. Kevin
    January 16, 2012 at 6:35 PM #

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

  7. Laura
    February 6, 2012 at 3:19 PM #

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

  8. Ken
    February 9, 2012 at 11:12 PM #

    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. Paul
    March 13, 2012 at 9:24 AM #

    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.


  10. Mark
    March 15, 2012 at 6:17 PM #

    You just saved my butt.

  11. Zhiliang
    May 17, 2012 at 3:24 PM #

    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. Greg
    May 22, 2012 at 10:27 AM #

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