Reputation: 515
I want to install the DBD::Oracle
module in Cygwin. I have downloaded the Oracle Instant Client (ver 12.1) at C:\Oracle\instantclient_12_1
. I have also downloaded the SDK and SQLPlus and extracted them into the instantclient_12_1 dir. The I set my ORACLE_HOME path as export ORACLE_HOME=/cygdrive/c/Oracle/instantclient_12_1
and LD_LIBRARY_PATH as export LD_LIBRARY_PATH=/cygdrive/c/Oracle/instantclient_12_1/lib
. When I try to install the package, I get the following:
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]
'YAML' not installed, will not store persistent state
PYTHIAN/DBD-Oracle-1.66.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
Why is the installer not able to detect the version? What should I do to install the module successfully?
EDIT: Following a suggestion below, I tried perl Makefile.PL -V 12.1.0
. I got the output as:
Installing on a cygwin, Ver#1.7
Using Oracle in /cygdrive/c/Oracle/instantclient_12_1
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 PATH environment variable
set to include the directory containing the Oracle libraries.
Forcing Oracle version to be treated as 12.1.0
Oracle version 12.1.0 (12.1)
Using OCI directory 'sdk'
client_version=12.1
DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"12.1.0\" -DORA_OCI_102 -DORA_OCI_112
Checking for functioning wait.ph
System: perl5.014004 cygwin_nt-6.1 yaakov04 1.7.18(0.26353) 2013-03-07 19:25 x86_64 cygwin
Compiler: gcc -O3 -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -fstack-protector
Linker: /usr/bin/ld
Sysliblist:
Checking if your kit is complete...
Looks good
LD_RUN_PATH=/cygdrive/c/Oracle/instantclient_12_1/lib:/cygdrive/c/Oracle/instantclient_12_1/rdbms/lib
Using DBD::Oracle 1.66.
Using DBD::Oracle 1.66.
Using DBI 1.623 (for perl 5.014004 on cygwin-thread-multi) installed in /usr/lib/perl5/vendor_perl/5.14/x86_64-cygwin-threads/auto/DBI/
Generating a GNU-style Makefile
Writing Makefile for DBD::Oracle
Writing MYMETA.yml and MYMETA.json
But after make, make test and make install
, the module is still not installed properly and I cannot run any scripts using this (make test
returned 37/38 failed cases). I am unable to see how to proceed.
Upvotes: 0
Views: 2430
Reputation: 13
I followed this guide after I ran CygWin Terminal as Administrator and everything worked.
Of course you need to download the 32bit win .zip versions instead of the .rpm files:
and unzip them all to eg. c:\Oracle\
Start Cygwin terminal as administrator and perform following steps:
export ORACLE_HOME=/cygdrive/c/Oracle/instantclient_12_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_DSN=DBI:Oracle:host=<oracle hostname>;sid=<oracle sid>
export ORACLE_USERID=user/password@<sid>
cpan get DBD::Oracle
cd into .cpan/build/DBD-Oracle* folder
perl Makefile.PL
make
make install
Check with cpan DBD::Oracle
to verify the installation.
Upvotes: 1
Reputation: 98378
And did you try following the instructions and saying:
perl Makefile.PL -V 12.1.0
?
Upvotes: 0