我已经在WSL Ubuntu 18.04上安装了bioperl,sudo apt-get install bioperl bioperl-run
。我试图用cpanm安装Bio::Grep,但它失败了。从build.log
文件中可以看出测试过程中似乎有些失败:
#
# *****************************************************************************
# * Bioperl : FOUND *
# * Bioperl-run: FOUND *
# * Backend : No backend found in path. You should install the back-ends *
# * before running these tests. This way you make sure that the *
# * parsers work with your installed version of the back-end. *
# * EMBOSS : FOUND *
# *****************************************************************************
t/00.checkprereq.t ............ ok
# Failed test 'use Bio::Grep::Backend::Agrep;'
# at t/00.load.t line 14.
# Tried to use 'Bio::Grep::Backend::Agrep'.
# Error: UNIVERSAL does not export anything at ...
...
Test Summary Report
-------------------
t/00.load.t (Wstat: 1280 Tests: 12 Failed: 5)
Failed tests: 3-7
Non-zero exit status: 5
t/10.backends.all.t (Wstat: 65280 Tests: 133 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 344 tests but ran 133.
t/11.backends.guugle.t (Wstat: 0 Tests: 1 Failed: 1)
Failed test: 1
Parse errors: Bad plan. You planned 0 tests but ran 1.
t/11.backends.re.t (Wstat: 65280 Tests: 1 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 30 tests but ran 1.
t/20.filter.t (Wstat: 65280 Tests: 17 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 46 tests but ran 17.
t/30.features.alignments.t (Wstat: 65280 Tests: 50 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 108 tests but ran 50.
t/30.features.updownstream.t (Wstat: 65280 Tests: 16 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 46 tests but ran 16.
t/40.utils.t (Wstat: 65280 Tests: 1 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 30 tests but ran 1.
t/50.synopsis.t (Wstat: 512 Tests: 9 Failed: 2)
Failed tests: 6-7
Non-zero exit status: 2
Files=13, Tests=242, 10 wallclock secs ( 0.11 usr 0.19 sys + 2.33 cusr 5.13 csys = 7.76 CPU)
Result: FAIL
Failed 9/13 test programs. 8/242 subtests failed.
-> FAIL Installing Bio::Grep failed
似乎有人创建了票证并遇到了类似的问题,但我没有找到解决方案。
解决方法很简单:删除use UNIVERSAL ...;
行。
wget https://cpan.metacpan.org/authors/id/L/LI/LIMAONE/Bio-Grep-v0.10.6.tar.gz
tar xvzf Bio-Grep-v0.10.6.tar.gz
cd Bio-Grep-v0.10.6
perl -pe's/^(?=use UNIVERSAL)/#/' -i~ lib/Bio/Grep/Backend/BackendI.pm
perl Makefile.PL && make test && make install