Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

CPAN, recursive dependency problem

by ecsd (Initiate)
on Jan 28, 2005 at 00:48 UTC ( #425824=perlquestion: print w/replies, xml ) Need Help??
ecsd has asked for the wisdom of the Perl Monks concerning the following question:

I get this (sort of thing):

cpan> install Bundle::CPAN

Recursive dependency detected:
 => File::Spec
 => K/KW/KWILLIAMS/PathTools-3.03.tar.gz
 => Test
 => S/SB/SBURKE/Test-1.25.tar.gz
 => Test::Harness
 => P/PE/PETDANCE/Test-Harness-2.46.tar.gz
 => File::Spec.
Cannot continue.

"force install" does not fix it either.
How can I get past this? Tell it I don't care,
or break the chain of dependencies. Presumably there
aren't dependency loops for a real fact.


Replies are listed 'Best First'.
Re: CPAN, recursive dependency problem
by saintmike (Vicar) on Jan 28, 2005 at 01:16 UTC
    You could break the cycle by downloading individual tarballs, e.g:
    cpan> get K/KW/KWILLIAMS/PathTools-3.03.tar.gz
    hunt it down on disk (~/.cpan/sources/...), untar, build and install manually:
    tar zxfv PathTools-3.03.tar.gz cd PathTools-3.03 perl Makefile.PL make install

      Where (or how) does CPAN's install figure that there is a dependency? I would like to be able to break stuff to lie to it,
      and I'd as soon break the "idea" that there is a dependency loop.

      Also, if this comes up with any frequency, I'd suggest enforcing some scheme to prevent such loops in the first place.
      I haven't seen any reference to this issue in any other FAQs (CPAN, Perl) but it bites often enough.

      Thanks for the information.

      It's worth pointing out that CPAN will also not allow a "get"
      of a module in a dependency chain, so that has to be done manually also.
        It's worth pointing out that CPAN will also not allow a "get" of a module in a dependency chain ...

        Not true.

        Here's a quick way to verify dependencies (even circular ones): There's two modules on CPAN with the sole purpose of defining a circular dependency between each other: Acme::Prereq::A and Acme::Prereq::B.

        Acme::Prereq::A depends on Acme::Prereq::B and vice versa, see Acme::Prereq::A's Makefile.PL:

        'PREREQ_PM' => { 'Acme::Prereq::B' => 0, }, # e.g., Module::Name => 1.1

        Try it out, it works fine:

        perl -MCPAN -eshell cpan> get Acme::Prereq::B

        The CPAN shell's get command will fetch the requested module's tarball without checking dependencies.

        However, if you've run into a recursive dependency within a CPAN session, will keep complaining, even if you switch to get. Restart the CPAN shell to get back to normal.

Re: CPAN, recursive dependency problem
by Mr. Muskrat (Canon) on Jan 28, 2005 at 02:24 UTC

    Have you tried this?

    cpan> install File::Spec

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://425824]
Approved by thor
[shmem]: [Discipulus: what do you mean by "dump" ?
[shmem]: Discipulus: what do you mean by "dump" ?

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2017-05-23 09:58 GMT
Find Nodes?
    Voting Booth?