CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Perl errors after upgrading the linux o/s version

 



ramakanth_burra
New User

Jul 17, 2014, 4:21 AM

Post #1 of 4 (359 views)
Perl errors after upgrading the linux o/s version Can't Post

Hi,

We use an ODBC connection to connect to MSSQL server from Perl code on of one our linux servers. Currently, we have migrated our servers to have higher version of Linux from 4 to 6.5. However, after the migration, we are unable to connect to the database and are seeing the below errors.

Can't locate Test.pm in @INC (@INC contains: /var/abc/cgi-bin/usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/pel5 /usr/share/perl5 .) at /var/abc/xyz/secure/sample.pl line 14.
BEGIN failed--compilation aborted at /var/abc/xyz/secure/test.pl line 14.
Premature end of script headers: test.pl

If anyone can provide help/suggestions to resolve this issue, it would be very helpful. Please contact me if you need any further information on the above. You help is greatly appreciated

Thanks in advance
Ramakanth


FishMonger
Veteran / Moderator

Jul 17, 2014, 6:38 AM

Post #2 of 4 (356 views)
Re: [ramakanth_burra] Perl errors after upgrading the linux o/s version [In reply to] Can't Post


Quote
Can't locate Test.pm in @INC


You need to install that module.

That's a core module.
Test was first released with perl 5.00405

If it's missing, then I'd say that your Linux upgrade process broke your perl installation. You should probably reinstall perl and all non core modules that you require.


(This post was edited by FishMonger on Jul 17, 2014, 6:42 AM)


ramakanth_burra
New User

Jul 17, 2014, 7:20 AM

Post #3 of 4 (351 views)
Re: [FishMonger] Perl errors after upgrading the linux o/s version [In reply to] Can't Post

Hi FishMonger...thanks very much for your reply.

The Test.pm file is actually a code file, which had a different name in the source code. I renamed it to Test for security.

Kindly suggest what can be done

Thank you


FishMonger
Veteran / Moderator

Jul 17, 2014, 7:34 AM

Post #4 of 4 (345 views)
Re: [ramakanth_burra] Perl errors after upgrading the linux o/s version [In reply to] Can't Post

For starters, don't name your custom module the same as one of Perl's core modules.

Can you post your code? I'd need to see at least upto the line that generates the error.

If your custom module isn't in the @INC path, then you'll need to use a "use lib" statement to add its path.

Code
use lib '/Path/To/Your/Module'; 
use YourModule;



(This post was edited by FishMonger on Jul 17, 2014, 7:35 AM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives