DBD::Oracle installation causing error

前端 未结 2 1103
逝去的感伤
逝去的感伤 2021-01-29 12:48

I want to connect to an Oracle Database through Perl. For this, I\'m trying to install DBD::Oracle from CPAN by using the following command:

[root@localhost Admi         


        
相关标签:
2条回答
  • 2021-01-29 13:00

    Refer these steps in given sequence.

    • Install Perl DBI module
    • install below 3 rpm for oracle instant client (from http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html)

      oracle-instantclient11.2-basic-11.2.0.3.0-1
      oracle-instantclient11.2-devel-11.2.0.3.0-1
      oracle-instantclient11.2-sqlplus-11.2.0.3.0-1
      

    I am using 64 bit linux box, so choose your RPM accordingly.

    • set below variables:

      LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
      ORACLE_HOME=/usr/lib/oracle/11.2/client64
      

      MacOS users will need:

      DYLD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/
      

      Also add ORACLE_HOME to your PATH variable.

    • download DBD::Oracle from CPAN

    • untar the module and run below commands in given sequence:

      perl Makefile.PL
      make
      make install
      

      OR you can install the module using cpan command

    DONE !!!

    0 讨论(0)
  • 2021-01-29 13:15

    Thanks for the info! I noticed that oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm installed into /usr. So adding a soft link like this helps me solved the problem.

    sudo ln -s /usr/include/oracle/11.2/client64 $ORACLE_HOME/include

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