如何在cpan Bio中自动安装所有依赖项

时间:2020-02-14 10:41:43

标签: perl cpan

您好,我实际上是在尝试安装一个名为HMMCleaner的perl软件包

我为此命令运行:

cpan Bio::MUST::Apps::HmmCleaner

但是在此过程中,我收到了几则消息:Warning: prerequisite something 0 not found.

这是输出的开头:

(/beegfs/data/me/myconda) me@pbil-deb:/beegfs/data/me/TOOLS/Bio-MUST-Apps-HmmCleaner-0.180750/bin$ cpan Test::Harness::Straps
Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/beegfs/home/me/.cpan/Metadata'
  Database was generated on Fri, 14 Feb 2020 09:41:03 GMT
Running install for module 'Test::Harness::Straps'
Fetching with LWP:
http://www.cpan.org/authors/id/M/MS/MSCHWERN/Test-Harness-Straps-0.30.tar.gz
Fetching with LWP:
http://www.cpan.org/authors/id/M/MS/MSCHWERN/CHECKSUMS
Checksum for /beegfs/home/me/.cpan/sources/authors/id/M/MS/MSCHWERN/Test-Harness-Straps-0.30.tar.gz ok
Configuring M/MS/MSCHWERN/Test-Harness-Straps-0.30.tar.gz with Build.PL
Test::Harness::Straps is provided for backwards compatibility only.
No further development is planned.  No bugs will be fixed.

For customizable TAP parsing please use L<TAP::Parser> instead.

Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Test-Harness-Straps' version '0.30'
  MSCHWERN/Test-Harness-Straps-0.30.tar.gz
  /beegfs/data/me/myconda/bin/perl Build.PL --installdirs site -- OK
Running Build for M/MS/MSCHWERN/Test-Harness-Straps-0.30.tar.gz
Building Test-Harness-Straps
  MSCHWERN/Test-Harness-Straps-0.30.tar.gz
  ./Build -- OK
Running Build test
t/00compile.t ...... 1/5 # Testing Test::Harness::Straps 0.30 under Perl 5.026002 and Test::More 1.302073
t/00compile.t ...... ok   
t/callback.t ....... ok     
t/point-parse.t .... ok     
t/point.t .......... ok     
t/strap-analyze.t .. ok       
t/strap.t .......... ok     
All tests successful.
Files=6, Tests=425,  9 wallclock secs ( 0.12 usr  0.04 sys +  0.98 cusr  0.67 csys =  1.81 CPU)
Result: PASS
  MSCHWERN/Test-Harness-Straps-0.30.tar.gz
  ./Build test -- OK
Running Build install
Building Test-Harness-Straps
Installing /beegfs/home/me/perl5/lib/perl5/Test/Harness/Assert.pm
Installing /beegfs/home/me/perl5/lib/perl5/Test/Harness/Straps.pm
Installing /beegfs/home/me/perl5/lib/perl5/Test/Harness/Results.pm
Installing /beegfs/home/me/perl5/lib/perl5/Test/Harness/Point.pm
Installing /beegfs/home/me/perl5/lib/perl5/Test/Harness/Iterator.pm
Installing /beegfs/home/me/perl5/man/man3/Test::Harness::Point.3
Installing /beegfs/home/me/perl5/man/man3/Test::Harness::Assert.3
Installing /beegfs/home/me/perl5/man/man3/Test::Harness::Results.3
Installing /beegfs/home/me/perl5/man/man3/Test::Harness::Iterator.3
Installing /beegfs/home/me/perl5/man/man3/Test::Harness::Straps.3
  MSCHWERN/Test-Harness-Straps-0.30.tar.gz
  ./Build install  -- OK
(/beegfs/data/me/myconda) me@pbil-deb:/beegfs/data/me/TOOLS/Bio-MUST-Apps-HmmCleaner-0.180750/bin$ cpan Bio::MUST::Apps::HmmCleaner
Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/beegfs/home/me/.cpan/Metadata'
  Database was generated on Fri, 14 Feb 2020 09:41:03 GMT
Running install for module 'Bio::MUST::Apps::HmmCleaner'
Checksum for /beegfs/home/me/.cpan/sources/authors/id/A/AR/ARNODF/Bio-MUST-Apps-HmmCleaner-0.180750.tar.gz ok
Configuring A/AR/ARNODF/Bio-MUST-Apps-HmmCleaner-0.180750.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Bio::FastParsers::Hmmer 0 not found.
Warning: prerequisite Bio::MUST::Core 0.180230 not found.
Warning: prerequisite Bio::MUST::Core::Ali 0 not found.
Warning: prerequisite Bio::MUST::Core::Constants 0 not found.
Warning: prerequisite Bio::MUST::Core::GeneticCode::Factory 0 not found.
Warning: prerequisite Bio::MUST::Core::IdList 0 not found.
Warning: prerequisite Bio::MUST::Core::Seq 0 not found.
Warning: prerequisite Bio::MUST::Core::SeqMask 0 not found.
Warning: prerequisite Bio::MUST::Core::Utils 0 not found.
Warning: prerequisite Bio::MUST::Drivers 0.180270 not found.
Warning: prerequisite Bio::MUST::Drivers::Hmmer::Model::Temporary 0 not found.
Warning: prerequisite IPC::System::Simple 0 not found.
Warning: prerequisite Smart::Comments 0 not found.
Warning: prerequisite aliased 0 not found.
Generating a Unix-style Makefile
Writing Makefile for Bio::MUST::Apps::HmmCleaner
Writing MYMETA.yml and MYMETA.json
  ARNODF/Bio-MUST-Apps-HmmCleaner-0.180750.tar.gz
  /beegfs/data/me/myconda/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for A/AR/ARNODF/Bio-MUST-Apps-HmmCleaner-0.180750.tar.gz
----     Unsatisfied dependencies detected during    ----
---- ARNODF/Bio-MUST-Apps-HmmCleaner-0.180750.tar.gz ----
    Bio::FastParsers::Hmmer [requires]
    Bio::MUST::Core [requires]
    Bio::MUST::Core::Ali [requires]
    Bio::MUST::Core::Constants [requires]
    Bio::MUST::Core::GeneticCode::Factory [requires]
    Bio::MUST::Core::IdList [requires]
    Bio::MUST::Core::Seq [requires]
    Bio::MUST::Core::SeqMask [requires]
    Bio::MUST::Core::Utils [requires]
    Bio::MUST::Drivers [requires]
    Bio::MUST::Drivers::Hmmer::Model::Temporary [requires]
    IPC::System::Simple [requires]
    Smart::Comments [requires]
    aliased [requires]
Running install for module 'Bio::FastParsers::Hmmer'
Checksum for /beegfs/home/me/.cpan/sources/authors/id/D/DB/DBAURAIN/Bio-FastParsers-0.180470.tar.gz ok
Configuring D/DB/DBAURAIN/Bio-FastParsers-0.180470.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Const::Fast 0 not found.
Warning: prerequisite Exporter::Easy 0 not found.
Warning: prerequisite Smart::Comments 0 not found.
Warning: prerequisite XML::Bare 0.53 not found.
Warning: prerequisite aliased 0 not found.
Generating a Unix-style Makefile
Writing Makefile for Bio::FastParsers
Writing MYMETA.yml and MYMETA.json
  DBAURAIN/Bio-FastParsers-0.180470.tar.gz
  /beegfs/data/me/myconda/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for D/DB/DBAURAIN/Bio-FastParsers-0.180470.tar.gz
---- Unsatisfied dependencies detected during ----
---- DBAURAIN/Bio-FastParsers-0.180470.tar.gz ----
    Const::Fast [requires]
    Exporter::Easy [requires]
    Smart::Comments [requires]
    XML::Bare [requires]
    aliased [requires]
Running install for module 'Const::Fast'

所以我想知道是否有可能允许cpan安装所有需要的依赖项?

我问是因为尝试使用Bio :: MUST :: Apps :: HMMCleaner执行脚本时收到以下错误消息。

Can't locate Smart/Comments.pm in @INC (you may need to install the Smart::Comments module) (@INC contains:
    /beegfs/home/me/perl5/lib/perl5/x86_64-linux-thread-multi
    /beegfs/home/me/perl5/lib/perl5
    /beegfs/data/me/myconda/lib/site_perl/5.26.2/x86_64-linux-thread-multi
    /beegfs/data/me/myconda/lib/site_perl/5.26.2
    /beegfs/data/me/myconda/lib/5.26.2/x86_64-linux-thread-multi
    /beegfs/data/me/myconda/lib/5.26.2
    .
) at HmmCleaner.pl line 16. BEGIN failed--compilation aborted at HmmCleaner.pl line 16.

(添加了换行符以提高可读性。)

一些调试信息:

$ set | grep ^PERL
PERL5LIB=/beegfs/home/me/perl5/lib/perl5
PERL_LOCAL_LIB_ROOT=/beegfs/home/me/perl5
PERL_MB_OPT='--install_base "/beegfs/home/me/perl5"'
PERL_MM_OPT=INSTALL_BASE=/beegfs/home/me/perl5

$ echo 'o conf' | cpan | grep -P '^\s*(make|mbuild)'
Loading internal null logger. Install Log::Log4perl for logging messages
    make               [/usr/bin/X11/make]
    make_arg           []
    make_install_arg   []
    make_install_make_command [/usr/bin/X11/make]
    makepl_arg         [INSTALLDIRS=site]
    mbuild_arg         []
    mbuild_install_arg []
    mbuild_install_build_command [./Build]
    mbuildpl_arg       [--installdirs site]

$ which cpan
/beegfs/data/me/myconda/bin/cpan

$ head -n 1 "$( which cpan )"
#!/beegfs/data/me/myconda/bin/perl

$ which perl
/beegfs/data/me/myconda/bin/perl

$ cpan Smart::Comments
Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/beegfs/home/me/.cpan/Metadata'
  Database was generated on Fri, 14 Feb 2020 09:41:03 GMT
Running install for module 'Smart::Comments'
Checksum for /beegfs/home/me/.cpan/sources/authors/id/N/NE/NEILB/Smart-Comments-1.06.tar.gz ok
Configuring N/NE/NEILB/Smart-Comments-1.06.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Smart::Comments
Writing MYMETA.yml and MYMETA.json
  NEILB/Smart-Comments-1.06.tar.gz
  /beegfs/data/me/myconda/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for N/NE/NEILB/Smart-Comments-1.06.tar.gz
cp lib/Smart/Comments.pm blib/lib/Smart/Comments.pm
Manifying 1 pod document
  NEILB/Smart-Comments-1.06.tar.gz
  /usr/bin/X11/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/beegfs/data/me/myconda/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00.load.t ................. 1/1 # Testing Smart::Comments 1.06
t/00.load.t ................. ok   
t/assert.t .................. ok   
t/brackets.t ................ ok    
t/c_like_for_loop.t ......... ok   
t/check.t ................... ok   
t/confirm.t ................. ok   
t/ensure.t .................. ok   
t/ENV_0.t ................... ok   
t/ENV_1.t ................... ok   
t/ENV_str.t ................. ok   
t/insist.t .................. ok   
t/labelled_perlish_loop.t ... ok   
t/message.t ................. ok   
t/perlish_for.t ............. ok   
t/perlish_for_percentage.t .. ok   
t/pod-coverage.t ............ skipped: Test::Pod::Coverage 1.04 required for testing POD coverage
t/pod.t ..................... skipped: Test::Pod 1.14 required for testing POD
t/require.t ................. ok   
t/selective.t ............... ok   
t/simple_perlish_for.t ...... ok   
t/var.t ..................... ok   
t/verify.t .................. ok   
t/while.t ................... ok   
t/while_num.t ............... ok   
All tests successful.
Files=24, Tests=119, 19 wallclock secs ( 0.13 usr  0.08 sys +  2.93 cusr  1.45 csys =  4.59 CPU)
Result: PASS
  NEILB/Smart-Comments-1.06.tar.gz
  /usr/bin/X11/make test -- OK
Running make install
Manifying 1 pod document
Installing /beegfs/home/me/perl5/lib/perl5/Smart/Comments.pm
Installing /beegfs/home/me/perl5/man/man3/Smart::Comments.3
Appending installation info to /beegfs/home/me/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
  NEILB/Smart-Comments-1.06.tar.gz
  /usr/bin/X11/make install  -- OK

$ perl -e'use Smart::Comments; print "ok\n"'
ok

感谢您的帮助。

1 个答案:

答案 0 :(得分:3)

这就是它的作用。

例如,Warning: prerequisite Bio::FastParsers::Hmmer 0 not found.表示遇到了对Bio :: FastParsers :: Hmmer模块的版本0或更高版本的依赖。 Bio-FastParsers发行版提供了Bio :: MUST :: Apps :: HmmCleaner模块,您可以清楚地看到正在安装Bio-FastParsers

从技术上讲,这是可配置的。

$ echo 'o conf init prerequisites_policy' | cpan
...
The CPAN module can detect when a module which you are trying to build
depends on prerequisites. If this happens, it can build the
prerequisites for you automatically ('follow'), ask you for
confirmation ('ask'), or just ignore them ('ignore').  Choosing
'follow' also sets PERL_AUTOINSTALL and PERL_EXTUTILS_AUTOINSTALL for
"--defaultdeps" if not already set.

Please set your policy to one of the three values.

 <prerequisites_policy>
Policy on building prerequisites (follow, ask or ignore)? [follow] follow
...

但是默认值为follow,并且您的输出显示它是否遵循依赖关系。

相关问题