Recursive Dependencies in CPAN

I’ve been quiet lately, as I’ve had hardware problems and haven’t done much development on my spare spare machine.  Finally got a new one, and am installing everything.

Install Linux.  Configure CPAN.  First thing it does is complain CPAN is out of date, so I do the “install Bundle::CPAN” and wait.

It then fails, and copy and paste isn’t working.  Hmm.  Script will get it!

Recursive dependency detected:
=> Test::Harness
=> A/AN/ANDYA/Test-Harness-3.17.tar.gz
=> File::Spec
=> S/SM/SMUELLER/PathTools-3.30.tar.gz
=> Scalar::Util
=> G/GB/GBARR/Scalar-List-Utils-1.21.tar.gz
=> Test::More
=> M/MS/MSCHWERN/Test-Simple-0.88.tar.gz
=> Test::Harness.

Cannot continue.

Looks like a dependency loop in Test::Harness, Test::More, and Scalar::Utils.

I can see how that happened, but it’s going to make a clean install kind of a pain.

What’s the right answer in a case like this?  Can a central module like Test::Harness not use Scalar::Util?  Or the other way about?

I don’t even know who to report the issue to.  Each module author is doing the right thing here.

Going to bed.  I’ll worry about how to solve this in the morning.

Tags: ,

11 Responses to “Recursive Dependencies in CPAN”

  1. Curtis says:

    The way to break out of it would be to manually install (download the tarball, extract, perl Makefile.PL, make, make test, make install) Test-Simple.

    But do do a ‘perl -MTest::Harness -e print $Test::Harness::VERSION’ first and see if it gives you a response of 2.03 or better.

    Then ‘perl -MCPAN -e install(q{Bundle::CPAN})’ should do the trick.

  2. Curtis says:

    Oops, I described it in 2, 1, 3 order.

    Check the version first, do the manual install, then install the CPAN bundle.

  3. Tomas Doran says:

    Newer CPAN has fixed this. Install _just_ CPAN, then try to install Bundle::CPAN, and all will be well.

  4. Laufeyjarson says:

    Yes, that has done it. That’s wonderful. I was going to try manually installing one (or more) of the modules with the loop in them to see if that would satisfy it.

    Thanks again, Tomas!

    Now, to try and install Catalyst!

  5. Kerem ERSOY says:

    You can’t install manually. When you try to manual install any of them you get the same error. Recursevie ependencey condition exists in each of them.

    Furthermore install CPAN did not solve my problem : (

    • Laufeyjarson says:

      I discovered the same thing, that you couldn’t install any of the modules.

      Tomas’ directions worked for me. Just upgrading CPAN, then doing the install of the whole CPAN bundle got me past the recursive dependency.

      I’m sorry to hear it didn’t work well for you. Try asking on the mailing list and see if anyone has specific help for your platform, I guess.

  6. ME says:

    CPAN sucks, it almost never works strait out of the box, never, ever, saw it work strait away on ubuntu….. CPAN doesn’t give real user friendly error’s nor can it be called user friendly when it worked fine before.

    Just try installing the things you need by hand, or just give up, and go for bash, python, etc.


    Perl Rocks do ;D

    Kind regards a perl monk

  7. wpns says:

    I had this exact problem, and none of the solutions I could find seemed to make any difference. Careful inspection of the logs revealed that the date/time on my Linux box was significantly off, and since the timestamp on some files was more than (a megasecond?) in the future, the installation failed.

    Correcting the time on my box solved the problem. Worth a check. Use the ‘date’ command to check and set the time.

  8. japh_hopeful says:

    Did the install CPAN, install Bundle::CPAN, install Catalyst … but get stuck on the testing:
    Test Summary Report
    t/aggregate/live_engine_request_body.t (Wstat: 256 Tests: 23 Failed: 1)
    Failed test: 23
    Non-zero exit status: 1
    Files=115, Tests=2426, 158 wallclock secs ( 0.67 usr 0.40 sys + 147.32 cusr 6.91 csys = 155.30 CPU)
    Result: FAIL
    Failed 1/115 test programs. 1/2426 subtests failed.
    make: *** [test_dynamic] Error 255
    /usr/bin/make test — NOT OK
    //hint// to see the cpan-testers results for installing this module, try:
    reports FLORA/Catalyst-Runtime-5.80013.tar.gz
    Running make install
    make test had returned bad status, won’t install without force
    Failed during this command:
    FLORA/Catalyst-Runtime-5.80013.tar.gz : make_test NO

    but I dont know what to do next.
    Any suggestions?

  9. insane says:

    Thank you very much ‘wpns’, updating the date on my VirtualMachine did the trick and the installation of Bundle::CPAN worked fine.

Leave a Reply