How to Install DBD::Oracle in Strawberry Perl

后端 未结 4 1584
感动是毒
感动是毒 2021-01-02 04:25

I am trying to install DBD::Oracle using the CPAN shell in Strawberry Perl. I initially experienced an error because the Makefile could not locate an OCI

相关标签:
4条回答
  • 2021-01-02 05:01

    Strawberry Perl 5.20 (since May, 2014) ships with DBD::Oracle, as long as you install instantclient 11.x version it works out of the box. See http://strawberryperl.com/release-notes/5.20.0.1-64bit.html

    Newly added DBD::Oracle - you have to install 64bit Oracle Instant Client 11.x and make sure you have OCI.DLL in your PATH

    0 讨论(0)
  • 2021-01-02 05:03

    DBD::Oracle is notoriously difficult to compile, multiplied by Windows, and you're better off just not doing it if you can avoid it. Unfortunately ActiveState does not supply a PPM for it for licensing reasons nor do the other PPM repositories I looked through. Though its rumored that ActivePerl 5.10.0.1003 comes with DBD-Oracle.

    If your Oracle server supports ODBC, you can talk to it using DBD::ODBC.

    If you want to try, here are some special instructions for installing DBD::Oracle on Strawberry Perl which may be of help.

    0 讨论(0)
  • 2021-01-02 05:05

    I documented what worked for me on Win32 here on my blog. Actually everything went smoothly except the DBI make process didn't detect my installed Oracle Client version correctly. A little deciphering of the make file and I saw there was a parameter to explicitly specify the version. I had to run the make and install commands manually but it all worked out.

    I tried to use some pre-compiled modules but they were compiled with a specific version of Strawberry Perl in mind. I think I found a 5.12 compiled DBI for Oracle and it complained when I tried to use it with the latest 5.16 Strawberry Perl so that's why I went the manual build route.

    From here on out I will probably just copy my c:\perl binary directory to other machines I need it, set environment variables and roll with it.

    0 讨论(0)
  • 2021-01-02 05:07

    If you don't have all of the Oracle source (*.h, *.c) files, you can install DBD::Oracle via ppm, just like ActiveState. Or copy the library files from the ActiveState distribution.

    0 讨论(0)
提交回复
热议问题