Error While Installing Dbd::Oracle

Error while installing DBD::Oracle

After the installation and setup of the Oracle Instant Client, use the normal build steps without the cpan tool, and pass the -l option to the Makefile.PL

  1. Download the tar.gz package and unpack it

  2. Build it

    perl Makefile.PL -l
    make && make test
  3. Install

    make install

Error When Trying to Install DBD::Oracle with CPANM

I had the same issue. Fixed it by doing ./Configure -es -Dprefix=$HOME/usr/local -Dcc=gcc -Duse64bitall -Dusethreads for perl install

DBD-Oracle-1.76 installation issue

If you're on Redhat/Fedora/RHEL/CentOS then try this before make:

sudo yum install libaio-devel

If Ubuntu (or Debian?) try:

sudo apt install libaio-dev

...or sudo apt-get install libaio libaio1 libaio-dev

I also needed:

export ORACLE_HOME=/wherever/oracle18-instantclient/instantclient_18_5
export LD_LIBRARY_PATH="$ORACLE_HOME:/usr/lib/x86_64-linux-gnu/"

Error while installing DBD::Oracle might be helpful.

Unable to Install DBD::Oracle for Perl on Windows

I resolved the problem by installing the 32-bit Oracle Client 11g version onto the computer in this location c:\oracle. It doesn't work using the instantclient version because the instant client doesn't contain the necessary libraries.

Download "Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (32-bit)" from the below link and install the full administrator verion
http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html

Next, create ORACLE_HOME variable in your environmental variables on your computer and add the following path to it: ORACLE_HOME=C:\Oracle\product\11.2.0\client_1

Next, create LD_LIBRARY_PATH variable and add the below path:
LD_LIBRARY_PATH=C:\Oracle\product\11.2.0\client_1\lib

Afterwards, install module using perl without testing it. During the test it will fail, because its trying to connect to your database:

  1. perl -MCPAN -e shell
  2. notest install DBD::Oracle

Open the odbcad32.exe in this location C:\Windows\SysWOW64\ and click Add. Type Oracle for the name and description and click save. The SysWOW64 will connect the 32-bit version of the odbcad32 application to create the reference.

NOTE: The biggest problem you will have is to ensure you are using 32-bit drivers using cygwin, oracle software, and odbcad32. You will receive that can't load library if you mix 64-bit drivers with 32-bit drivers.

Reopen any command prompt window and try running your perl script again.

Cannot install DBD::Oracle on macOS Big Sur = dependent dylib '@rpath/libclntsh.dylib.19.1' not found

The problem is that the DYLD_LIBRARY_PATH environment variable is not propagated to perl when running make test as described here. Instead of running cpanm DBD::Oracle, you can download the module run the tests manually using e.g. prove. The following worked for me (macOS BigSur 11.2.1), perlbrew perl version 5.32.0:

  • Download and install instantclient-basic-macos.x64-19.8.0.0.0dbru.dmg and instantclient-sdk-macos.x64-19.8.0.0.0dbru.dmg from https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html

  • Install DBD::Oracle (without running make test)

    $ wget https://cpan.metacpan.org/authors/id/M/MJ/MJEVANS/DBD-Oracle-1.80.tar.gz
    $ tar zxvf DBD-Oracle-1.80.tar.gz
    $ cd DBD-Oracle-1.80
    $ export DYLD_LIBRARY_PATH=/Users/hakonhaegland/Downloads/instantclient_19_8
    $ export ORACLE_HOME=/Users/hakonhaegland/Downloads/instantclient_19_8
    $ cpanm --installdeps .
    $ perl Makefile.PL
    $ make
    $ prove -bv t
    $ make install

NOTES:

  • The issue has also been reported on the GitHub issue tracker here

  • Another approach could be to turn off System Integrity Protection



Related Topics



Leave a reply



Submit