ashprog has asked for the wisdom of the Perl Monks concerning the following question:

Hello all, am trying to run a perl code using a module "RNA.pm" but not able to compile; terminal is showing the error as

Can't locate loadable object for module RNA in @INC (@INC contains: /home/ashish/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux /home/ashish/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0 /home/ashish/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_64-linux /home/ashish/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0 .) at RNA.pm line 11. Compilation failed in require at vienna.pl line 11

I am using ubuntu 12.04.

Replies are listed 'Best First'.
Re: RNA.pm module loading problem
by toolic (Bishop) on Sep 04, 2013 at 17:12 UTC
    You should show us the first 11 lines of your RNA.pm and vienna.pl files.
      #!/usr/bin/perl/

      use warnings;

      use strict;

      use Class::Struct;

      use RNA;

      This are the first 11 lines of my vienna.pl file and the compilation stops at the "use RNA" line

        http://web.mit.edu/seven/src/ViennaRNA-1.5/Perl/RNA.pm

        this is the link to RNA.pm file

        thanks

Re: RNA.pm module loading problem
by runrig (Abbot) on Sep 04, 2013 at 17:18 UTC
    What directory is RNA.pm in? You probably need to use a 'use lib' statement or set the PERL5LIB environment variable to tell perl where that library is. Or you need to install the RNA library.
      Hi, my name is Qian, and I am experiencing a similar problem here.
      I can see that my RNA.pm is in this directory: /share/apps/ViennaRNA-2.1.7/compile-install/lib/site_perl/5.14.2/x86_64-linux-thread-multi/RNA.pm

      I have posted a more detailed question on the StackOverflow if that helps: https://stackoverflow.com/questions/62050749/viennarna-packages-perl-module-rna-pm-is-required

      Can you please elaborate more on "use a 'use lib' statement or set the PERL5LIB environment variable to tell perl where that library is. Or you need to install the RNA library." I don't fully understand how I should do that. Thanks in advance for any help and sorry if this is a very basic question!
Re: RNA.pm module loading problem
by CountZero (Bishop) on Sep 04, 2013 at 19:37 UTC
    Do you mean Bio::Phylo::Matrices::Datatype::Rna? If so, how did you install RNA.pm?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics