Prokka installation - compilation aborted
1
0
Entering edit mode
11 months ago

Hi,

I installed Prokka using this code posted at https://github.com/tseemann/prokka

sudo apt-get install libdatetime-perl libxml-simple-perl libdigest-md5-perl git default-jre bioperl
sudo cpan Bio::Perl
git clone https://github.com/tseemann/prokka.git $HOME/prokka
$HOME/prokka/bin/prokka --setupdb

All the steps worked pretty well except the last line for database indexing $HOME/prokka/bin/prokka --setupdb I got this compilation error message:

Can't locate XML/Simple.pm in @INC (you may need to install the XML::Simple module) (@INC contains: /home/miniconda3/lib/site_perl/5.26.2/x86_64-linux-thread-multi /home/miniconda3/lib/site_perl/5.26.2 /home/miniconda3/lib/5.26.2/x86_64-linux-thread-multi /home/miniconda3/lib/5.26.2 .) at /home/prokka/bin/prokka line 29. BEGIN failed--compilation aborted at /home/prokka/bin/prokka line 29.

I ran cpan install XML::Simple

Then ran $HOME/prokka/bin/prokka --setupdb

and still have the same error. Any help, please?

Thanks

database Prokka compilation indexing • 1.8k views
ADD COMMENT
0
Entering edit mode

Have you run cpan install XML::Simple with sudo? It may have installed the module to your local path and that path may not be in your perl path. Try either adding that local directory to your perl path or installing the package with sudo.

ADD REPLY
0
Entering edit mode

Thanks for your comment, but sudo cpan install XML::Simple did not work!

ADD REPLY
1
Entering edit mode
11 months ago
Michael 54k

You have multiple Perl installations which is causing your problem. You have a system Perl into which you have installed some Perl modules with sudo apt-get install. However, you also have a Miniconda installed Perl which is used by Prokka because it takes precedence in your path. Check out which -a perl that gives you a list of all Perl binaries in your Path. To solve this you need to decide which Perl you want to use. You could, for example, install all required modules using conda or cpan (checkout which cpan to see that you are using the conda-provisioned one), modify your $PATH environment to give precedence to system perl, or change all your perl scripts to start with #!/path/to/perl where path/to/perl is of course the path to the perl you choose. I do however recommend the first option to use conda perl.

ADD COMMENT
0
Entering edit mode

Yes, I have multiple Perl installations (please see below):

    which -a perl

/home/xxxxxx/miniconda3/bin/perl
/usr/bin/perl
/bin/perl


     which cpan

/home/xxxxx/miniconda3/bin/cpan

from prokka folder, shebang of Perl script

#!/usr/bin/env perl

path of cpan
#!/home/xxxxx/miniconda3/bin/perl

Sorry to ask again, but should I replace #!/usr/bin/env perl from Prokka folder with #!/home/xxxxx/miniconda3/bin/perl (cpan)? And do the same for all Perl files in Prokka folder?

Thanks!

ADD REPLY
1
Entering edit mode

Disclaimer, I havent ever installed that software...

Please try the easy way first as described in the documentation first:

conda install -c conda-forge -c bioconda -c defaults prokka # install into base env

or even better:

conda create -n prokka -c conda-forge -c bioconda -c defaults prokka # make a prokka env
conda activate prokka

should I replace #!/usr/bin/env perl from Prokka folder with #!/home/xxxxx/miniconda3/bin/perl (cpan)? And do the same for all Perl files in Prokka folder?

No, that would have no effect as /usr/bin/env perl is already miniconda3/bin/perl.

You should install and use preferentially miniconda perl, not system-wide perl. Using system wide perl for services is a NO-NO. Install ALL requested perl modules using conda or cpan, DO NOT use apt-get, DO NOT use sudo. Therefore, you have to find out what the modules are called in cpan using the module search, then do something like

cpan # not sudo!
> install XML::Simple

> install Digest::MD5
ADD REPLY
0
Entering edit mode

Thanks so much! It works perfectly.

ADD REPLY

Login before adding your answer.

Traffic: 2636 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6