This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error building local BLAST database with update_blastdb.pl: Error "Can't locate List/MoreUtils.pm in @INC"

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 database local build

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

1 answer

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.

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

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

$ 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.

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

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.

I did use cpanm List::MoreUtils as suggested

So it did not work or it did?

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

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

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

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.

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

What is the result of which perl?

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

Log in to answer this question.