LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-20-2013, 01:48 PM   #1
sujeeva
LQ Newbie
 
Registered: Jan 2013
Posts: 6

Rep: Reputation: Disabled
Can't locate object method "require_version" via package "DBI"


Hi,

I get the following error when attempting to start apache in Linux. This issue appears in some forums but the solution is not clear to me.

I'm in the process of porting the application from AIX to Linux. Please advise.

Thanks in advance,

Sujeeva

[sseneviratne@wlm6hub5app01 dev]$ uname -a
Linux xxxx.xxx.xx 2.6.32-279.5.2.el6.x86_64 #1 SMP Tue Aug 14 11:36:39 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

[Wed Feb 20 14:34:14 2013] [error] Can't locate object method "require_version" via package "DBI" at /usr/local/share/perl5/Apache/DBI.pm line 23.\nCompilation failed in require at /home/sujeeva/rundir/dev/www-rco/conf/startup.pl line 13.\nBEGIN failed--compilation aborted at /home/sujeeva/rundir/dev/www-rco/conf/startup.pl line 13.\nCompilation failed in require at (eval 2) line 1.\n
[Wed Feb 20 14:34:14 2013] [error] Can't load Perl file: conf/startup.pl for server xxxx:0, exiting...

My startup.pl:

#-------------------------------------------------------------------------

BEGIN {
# Make sure to list these backwards!
use lib '/usr/lib64/perl5/Bundle';
use lib '/home/sseneviratne/rundir/dev/rco/lib';
use lib '/home/sseneviratne/rundir/dev/rco/web/apache/lib';
}

#-------------------------------------------------------------------------

use Apache2 ();
use Apache:BI ();
use Apache2::Log ();
use Apache2::Const qw(:http :common);
use CGI qw(-compile :all);
use CGI::Carp ();

#-------------------------------------------------------------------------
# Initialize the database connections for each child

my $dbhost = Apache->server->dir_config('Database-Host')
or die 'Missing [Database-Host] variable';

my $dbuser = Apache->server->dir_config('Database-User')
or die 'Missing [Database-User] variable';

Apache:BI->connect_on_init(
"DBI:mysql:rpm:$dbhost",
$dbuser,
'',
{
PrintError => 1, # warn() on errors
RaiseError => 0, # don't die on error
AutoCommit => 1, # commit executes immediately
}
);

#-------------------------------------------------------------------------

1;
 
Old 02-20-2013, 02:09 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
http://search.cpan.org/search?query=dbi&mode=all
 
Old 02-20-2013, 03:42 PM   #3
sujeeva
LQ Newbie
 
Registered: Jan 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Habitual, can you please elaborate? The issue here is with the Apache:BI module.
 
Old 02-20-2013, 03:49 PM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
DBI.pm is a perl module and it needs to be available to the system.

you should see the same reference to DBI.pm if you
Code:
perl /home/sujeeva/rundir/dev/www-rco/conf/startup.pl
you may simply just need mod_perl from a cursory review of google hits.

OS? apache version installed please.

Last edited by Habitual; 02-20-2013 at 03:54 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't locate object method "connect" via package "mysql" (perhaps you forgot to load xman fiji Linux - Newbie 9 07-11-2012 08:05 PM
Perl DBI error cannot locate object method "require -version" nanda22 Programming 0 08-26-2009 08:32 AM
Can't locate object method "splitpath" via package "PACK001" at /usr/lib/perl5/5.8.8/ sajigeorge Linux - Software 1 01-11-2009 06:33 AM
perl install error: Can't locate object method "new" via package "Module::Build::Vers powah Linux - Software 0 10-24-2006 01:57 PM
Can't locate object method "splitpath" via package "File::Spec" RobJohnston Linux - General 2 06-28-2003 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration