Question: Error building local BLAST database with update_blastdb.pl: Error "Can't locate List/MoreUtils.pm in @INC"
0
gravatar for marongiu.luigi
4 months ago by
Germany, Mannheim, UMM
marongiu.luigi490 wrote:

Hello,

I have used update_blastdb.pl with Ubuntu 18 and it worked. I tried with ubuntu 19.04 and I am getting:

$ perl `which update_blastdb.pl`
Can't locate List/MoreUtils.pm in @INC (you may need to install the List::MoreUtils module) (@INC contains: /home/gigiux/src/anaconda/lib/site_perl/5.26.2/x86_64-linux-thread-multi /home/gigiux/src/anaconda/lib/site_perl/5.26.2 /home/gigiux/src/anaconda/lib/5.26.2/x86_64-linux-thread-multi /home/gigiux/src/anaconda/lib/5.26.2 .) at /home/gigiux/src/anaconda/bin/update_blastdb.pl line 43.
BEGIN failed--compilation aborted at /home/gigiux/src/anaconda/bin/update_blastdb.pl line 43.

I tried to install MoreUtils with conda install perl-list-moreutils, cpanm List::MoreUtils and apt-get install moreutils and I also changed the shebang from #!/usr/bin/perl to #!/usr/bin/env perl. The installation gave no errors but I can't launch update_blastdb.pl.

Any tips?

Thank you

blast local build database • 359 views
ADD COMMENTlink written 4 months ago by marongiu.luigi490
1

I'd advise against conda for perl. Use perlbrew and install modules with cpanm

ADD REPLYlink modified 4 months ago • written 4 months ago by Joe16k
1
gravatar for genomax
4 months ago by
genomax80k
United States
genomax80k wrote:

It should just be which update_blastdb.pl and not perl ... If you are trying to locate (which is also a unix command) that script.

ADD COMMENTlink modified 4 months ago • written 4 months ago by genomax80k

I got ~/src/anaconda/bin/update_blastdb.pl

ADD REPLYlink modified 4 months ago • written 4 months ago by marongiu.luigi490

So run it with perl ~/src/anaconda/bin/update_blastdb.pl if you want to update your local blast databases.

ADD REPLYlink written 4 months ago by genomax80k
$ perl ~/src/anaconda/bin/update_blastdb.pl
Can't locate List/MoreUtils.pm in @INC (you may need to install the List::MoreUtils module) (@INC contains: ~/src/anaconda/lib/site_perl/5.26.2/x86_64-linux-thread-multi ~/src/anaconda/lib/site_perl/5.26.2 ~/src/anaconda/lib/5.26.2/x86_64-linux-thread-multi ~/src/anaconda/lib/5.26.2 .) at ~/src/anaconda/bin/update_blastdb.pl line 43.
BEGIN failed--compilation aborted at ~/src/anaconda/bin/update_blastdb.pl line 43.
ADD REPLYlink written 4 months ago by marongiu.luigi490

Looks like you already posted in Error "Can't locate List/MoreUtils.pm in @INC". Did the solutions there not work? How did you install blast in first place?

ADD REPLYlink written 4 months ago by genomax80k

I thought that post was closed. I downloaded blast, place it in a folder and add the path to .bashrc

ADD REPLYlink written 4 months ago by marongiu.luigi490

That script is a convenience if you were going to keep updating a number of local blast indexes on a regular basis. If you are not in a need to do that then you could just go to ftp://ftp.ncbi.nih.gov/blast/db/ and get the database files you need by downloading all files which start with database name e.g. nt*.

If you want to fix the issue then you will need to install the perl module using @h.mon's suggestion in the other thread.

ADD REPLYlink modified 4 months ago • written 4 months ago by genomax80k

I did use cpanm List::MoreUtils as suggested

ADD REPLYlink written 4 months ago by marongiu.luigi490

So it did not work or it did?

ADD REPLYlink written 4 months ago by genomax80k

did not, I got the Can't locate List/MoreUtils.pm in @INC error.

ADD REPLYlink written 4 months ago by marongiu.luigi490

I suggest you purge your entire perl install and start over using perlbrew or similar.

ADD REPLYlink written 4 months ago by Joe16k

you mean remove perl? or how do i use conda and cpnm to remove the installation?

ADD REPLYlink written 4 months ago by marongiu.luigi490
1

Use conda uninstall, followed by all the relevant perl packages you installed, assuming perl itself was installed via conda.

Then download perlbrew: https://perlbrew.pl/

This functions similarly to conda or pip, but specifically for perl. Once it's installed (it can be done locally without admin rights, like conda), which perl and which cpanm should give you sensible filepaths and installed binaries you can run.

Then simply something like: cpan List::MoreUtils should work, and when you invoke perl update_blastdb.pl, it should use the new perl binary. If it doesn't, check the shebang isn't hard coded to one of the system-wide perl binaries.

ADD REPLYlink written 4 months ago by Joe16k

And still the same:

$ perl ~/src/blast/bin/update_blastdb.pl
Can't locate List/MoreUtils.pm in @INC (you may need to install the List::MoreUtils module) (@INC contains: ~/src/anaconda/lib/site_perl/5.26.2/x86_64-linux-thread-multi ~/src/anaconda/lib/site_perl/5.26.2 ~/src/anaconda/lib/5.26.2/x86_64-linux-thread-multi ~/src/anaconda/lib/5.26.2 .) at ~/src/blast/bin/update_blastdb.pl line 43.
BEGIN failed--compilation aborted at ~/src/blast/bin/update_blastdb.pl line 43.
$ perl update_blastdb.pl
Can't open perl script "update_blastdb.pl": No such file or directory
ADD REPLYlink written 4 months ago by marongiu.luigi490

What is the result of which perl?

ADD REPLYlink written 4 months ago by Joe16k

There was still a perl under conda, so I removed it and now it works:

$ which perl
~/src/anaconda/bin/perl
$ conda uninstall perl
...
$ which perl
/usr/bin/perl
(base) 
$ perl ~/src/blast/bin/update_blastdb.pl
You need to install the perl-doc package to use this program.
(base)

case closed finally! Thank you

ADD REPLYlink written 4 months ago by marongiu.luigi490
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 912 users visited in the last hour