Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Software error...Plz help

by hamzakhanvit (Initiate)
on Jun 13, 2013 at 17:46 UTC ( #1038807=perlquestion: print w/ replies, xml ) Need Help??
hamzakhanvit has asked for the wisdom of the Perl Monks concerning the following question:

I am getting the following error upon compilation of my blast.cgi program

XSLoader::load('Your::Module', $Your::Module::VERSION) at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/XSLoader.pm line 25. Compilation failed in require at /usr/lib/perl5/5.8.8/File/Temp.pm line 137. BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.8/File/Temp.pm line 137. Compilation failed in require at blast.cgi line 5. BEGIN failed--compilation aborted at blast.cgi line 5.

Please help me out.



#!/usr/bin/perl use strict; use warnings; use Adrian::Goodies ':dirs'; use File::Temp; use File::Spec::Functions; use Env::Path 'PATH'; PATH->Append(BLAST_BIN_DIR) if BLAST_BIN_DIR; #my %VALID_PROGS = (blastn => 'allnucl', tblastn => 'allnucl', tblastx + => 'allnucl', # blastp => 'allprot', blastx => 'allprot'); #my %VALID_DBS = (allnucl => 'allnucl', nucl => 'allnucl', allflanks = +> 'allnucl', # flanks => 'allnucl', allprot => 'allprot', prot => ' +allprot'); my $cgi = CGI->new(); my ($title, $prog, $db, $seq) = ($cgi->param('title') || "notitle" . t +ime(), $cgi->param('prog'), $cgi->param('db'), $cgi->param('sequence')); $title =~ s/\s/ /g; $title = "notitle" . time() if $title eq ''; $seq =~ s/[^A-Za-z]//g; if ($cgi->request_method() eq 'POST' #and exists $VALID_PROGS{$prog} a +nd #exists $VALID_DBS{$db} and $seq) { my $seqfile = File::Temp->new(); open (my $fh, '>', $seqfile); print $fh ">$title\n"; print $fh $seq, "\n"; close $fh; my $execstring; # currently is secure if ($prog eq "blastp" and $db eq "allnucl"){ $execstring = "/home/groupii/ncbi-blast/bin/$prog -db \"" . ca +tfile(BLAST_DB_DIR, "allprot") . "\" -max_target_seqs 10 -word_size 5 + -evalue 100 -query \"$seqfile\""; } elsif ($prog eq "blastx" and $db eq "allnucl"){ $execstring = "/home/groupii/ncbi-blast/bin/$prog -db \"" . ca +tfile(BLAST_DB_DIR, "allprot") . "\" -max_target_seqs 10 -word_size 5 + -evalue 100 -query \"$seqfile\""; } elsif ($prog eq "blastn") { $execstring = "/home/groupii/ncbi-blast/bin/$prog -db \"" . ca +tfile(BLAST_DB_DIR, $db) . "\" -max_target_seqs 10 -word_size 5 -pen +alty -3 -reward 2 -task blastn -evalue 100 -query \"$seqfile\""; } else { $execstring = "/home/groupii/ncbi-blast/bin/$prog -db \"" . ca +tfile(BLAST_DB_DIR, $db) . "\" -max_target_seqs 10 -word_size 5 -eval +ue 100 -query \"$seqfile\""; } print $cgi->header('text/plain'); print qx{$execstring}; } else { print $cgi->redirect('../blast.html'); } exit;

Comment on Software error...Plz help
Download Code
Re: Software error...Plz help
by Preceptor (Chaplain) on Jun 13, 2013 at 17:54 UTC

    More detail is needed as to what your 'blast.cgi' program looks like.

    Without that I can only give a very vague answer - loading a module is tripping you up. It may be because that module isn't correctly installed. Look at 'blast.cgi' line 5, and see what it actually says.

      I have updated the code.......you can see it now
Re: Software error...Plz help
by blue_cowdawg (Monsignor) on Jun 13, 2013 at 19:07 UTC

    apparently either File::Temp is not installed on your system or is corrupt.


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
      I can neither find XSLoader.pm nor temp.pm in my perl lib,(Is it possible that they got deleted? or the server admin upadted the perl?) and still its showing the error at its line 25. I tried installing both the packages but now an error in DynaLoader.pm occured. I installed Dynaloader.pm too but again an error in temp.pm has occured.

        If you've a new error - please post that one too :).

        What method are you using to install the modules? You may find running:

        perl -MCPAN -e shell install File::Temp
Re: Software error...Plz help
by runrig (Abbot) on Jun 13, 2013 at 19:58 UTC
    Something is very broken, maybe you need to reinstall perl? Does this error?:
    perl -MFcntl -e 1
      The problem is on my lab's website and all these problems are popping up on the perl already installed on the web server.

        The problem is on my lab's website and all these problems are popping up on the perl already installed on the web server.

        If the perl on the server is old, or missing pieces, there is only one solution, install a new one, like in a new location, see http://www.citrusperl.com/download.html

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1038807]
Approved by talexb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2014-10-25 15:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (145 votes), past polls