Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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/ line 25. Compilation failed in require at /usr/lib/perl5/5.8.8/File/ line 137. BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.8/File/ 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;

Replies are listed 'Best First'.
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 nor 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 occured. I installed too but again an error in 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

Re: Software error...Plz help
by Preceptor (Deacon) 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 can see it now

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1038807]
Approved by talexb
[ambrus]: which is sort of a drawback compared to the ages of typewritten manuscripts representing content only to which the typesetter applies formatting, but that process required much more manual labor.
[ambrus]: If you want to typeset a manuscript, you can still do much less work then in the manual typesetting ages and get good formatting.
[ambrus]: All with only cheap modern computers and software.
[ambrus]: Something you can have at home and your corner print shop, without a whole printing press's worth of equipment.
[ambrus]: As for TeX, I'm not trying to discourage anyone from writing carefully beautifully typeset documents, in maths or outside. But most people aren't willing to do that, and will spend only little time about the formatting,
[ambrus]: and try to leave everything else to automated systems without checking how what they write came out format-wise, and for those people, discounting the part about journals with a specific format above,
[ambrus]: just blindly recommending to use LaTeX is a bad idea now.

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2017-09-26 11:18 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (293 votes). Check out past polls.