in reply to Re^2: DBD::Oracle install on Mac OSX 10.8.5 (Mountain Lion) (mwahaha)
in thread DBD::Oracle install on Mac OSX 10.8.5 (Mountain Lion)

Well nice tutorial but I have a question, I did all you explain and I have Mountain Lion.. but at the end when I launch < perl example.pl > an error message appear like this:

DBD::oracle initialisation failed: Can't locate object method "driver" + via package "DBD::oracle" at /System/Library/Perl/Extras/5.16/darwin +-thread-multi-2level/DBI.pm line 808. Perhaps the capitalisation of DBD 'oracle' isn't right. at Modulos/lib +/ConectarDB.pm line 17.

and this is ConectarDB.pm

#!/usr/bin/perl package ConectarDB; use strict; use DBI; # variables BD my $db_user = "example"; my $db_pass = "example"; my $host_name = "example"; my $db_name = "example"; # vars my $q_string = "DBI:oracle:host=$host_name;database=$db_name"; sub connect{ return (DBI->connect ($q_string, $db_user, $db_pass, {PrintError => 0, + RaiseError => 1})); } 1;

So, I try again, but it never works, can you help me??

Replies are listed 'Best First'.
Re^4: DBD::Oracle install on Mac OSX 10.8.5 (Mountain Lion) (mwahaha)
by Corion (Patriarch) on Dec 05, 2013 at 18:00 UTC

    Did you read the hint in the error message?

    Perhaps the capitalisation of DBD 'oracle' isn't right. at Modulos/lib +/ConectarDB.pm line 17.

    So, is your DBI connect string really supposed to say oracle? Should it maybe say Oracle?

      yes, I see that after I wrote to you, but now I have another problem, and it happen when I run perl (program).
      dyld: lazy symbol binding failed: Symbol not found: _OCIAttrSet Referenced from: /Library/Perl/5.16/darwin-thread-multi-2level/auto/ +DBD/Oracle/Oracle.bundle Expected in: flat namespace dyld: Symbol not found: _OCIAttrSet Referenced from: /Library/Perl/5.16/darwin-thread-multi-2level/auto/ +DBD/Oracle/Oracle.bundle Expected in: flat namespace
      I hope you can help me.. Thanks