Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Install Oracle Perl connector on OSX?

Posted on 2014-01-29
3
Medium Priority
?
602 Views
Last Modified: 2014-03-25
I need to debug some legacy code using perl and the Oracle DBI connector.

I have not been able to successfully install Oracle DBI on OSX.

The connection statement is:
DBI->connect($dsn, $login{name}, $login{pass}

The error is below.

How can I fix this?

test.pl: install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains: /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.4/darwin-thread-multi-2level /Library/Perl/Updates/5.12.4 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at (eval 14) line 3, <IN> line 17.
[Wed Jan 29 15:42:25 2014] test.pl: Perhaps the DBD::Oracle perl module hasn't been fully installed,
[Wed Jan 29 15:42:25 2014] test.pl: or perhaps the capitalisation of 'Oracle' isn't right.
[Wed Jan 29 15:42:25 2014] test.pl: Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.
0
Comment
Question by:code4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 39819674
From the command line, run:

perl -MCPAN -e 'install DBD::Oracle'
0
 
LVL 28

Accepted Solution

by:
FishMonger earned 2000 total points
ID: 39820792
It could be done from the command line with shorter syntax.

So, instead of: perl -MCPAN -e 'install DBD::Oracle'

I'd do:
cpan install DBD::Oracle

or even shorter
cpan DBD::Oracle

Both of those work for me on windows and Linux and should also work on a Mac, but I don't have a Mac to test.
0
 

Author Comment

by:code4
ID: 39825297
Thanks. CPAN install reports the following errors.
How can I fix this?

Trying to find an ORACLE_HOME
Found /Library/Oracle/instantclient_11_2

WARNING: Setting ORACLE_HOME env var to /Library/Oracle/instantclient_11_2 for you.
WARNING: If these tests fail you may have to set ORACLE_HOME yourself!
Installing on a darwin, Ver#12.0
Using Oracle in /Library/Oracle/instantclient_11_2
Use of uninitialized value $sqlplus_release in pattern match (m//) at Makefile.PL line 1626.
Use of uninitialized value $sqlplus_release in print at Makefile.PL line 1635.
Use of uninitialized value $sqlplus_release in pattern match (m//) at Makefile.PL line 1636.

          If sqlplus failed due to a linker/symbol/relocation/library error or similar problem
          then it's likely that you've not configured your environment correctly.
          Specifically, your DYLD_LIBRARY_PATH environment variable
          set to include the directory containing the Oracle libraries.
          
I'm having trouble finding your Oracle version number... trying harder

WARNING: I could not determine Oracle client version so I'll just
default to version 8.0.0.0. Some features of DBD::Oracle may not work.
Oracle version based logic in Makefile.PL may produce erroneous results.
You can use "perl Makefile.PL -V X.Y.Z" to specify a your client version.

Oracle version 8.0.0.0 (8.0)
DBD::Oracle no longer supports Oracle client versions before 9.2
 Try a version before 1.25 for 9 and 1.18 for 8! at Makefile.PL line 271.
Warning: No success on command[/usr/bin/perl Makefile.PL]
  PYTHIAN/DBD-Oracle-1.68.tar.gz
  /usr/bin/perl Makefile.PL -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We could spend the next millennium discussing the differences of the Mac and Windows platforms. The next century will continue to have fanatics on both side of the equation and neither side will win the war. However, that’s not why we are here. W…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question