How to skip a dependency when installing a Perl module using cpanp?
Question
I have the following error when trying to install Apache::Singleton
with cpanp
:
# cpanp i Apache::Singleton
Installing Apache::Singleton (0.15)
Running [/usr/bin/perl -e use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; } /root/.cpanplus/5.20.0/build/Apache-Singleton-0.15/Makefile.PL]...
[ info] generating script t/TEST
Generating a Unix-style Makefile
Writing Makefile for Apache::Singleton
Writing MYMETA.yml and MYMETA.json
[MSG] Module 'Apache::Singleton' depends on 'Apache::Test', may need to build a 'CPANPLUS::Dist::Arch' package for it as well
[MSG] Module 'Apache::Singleton' depends on 'ExtUtils::MakeMaker', may need to build a 'CPANPLUS::Dist::Arch' package for it as well
[MSG] Module 'Apache::Singleton' depends on 'Test::More', may need to build a 'CPANPLUS::Dist::Arch' package for it as well
[MSG] Module 'Apache::Singleton' depends on 'mod_perl2', may need to build a 'CPANPLUS::Dist::Arch' package for it as well
==> Making package: perl-apache-singleton 0.15-1 (Wed Jun 4 22:32:47 FET 2014)
==> Checking runtime dependencies...
==> Missing dependencies:
-> perl-apache-test>=1.35
==> Checking buildtime dependencies...
==> Missing dependencies:
-> perl-apache-test>=0
==> ERROR: Could not resolve all dependencies.
But Apache::Test
is already installed with the mod_perl
package. I can verify this using perl -e 'use Apache::Test'
. How can I tell cpanp
to skip this dependency?
Solution
At the moment you can't skip dependencies, just tests
cpanp i ... --skiptest
an alternative way of installing the "easy way" could be cpanm
, where you have a
cpanm ... --skip-installed
At least you could always just download the .deb
file (or .rpm
/.tgz
, depending on your distro) and just extract it and extract the data.tgz
(in .deb
files, at least) to /
.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow