1

I am running oracle DBD installation perl script which returns an error

~$ sudo perl -MCPAN -e 'install DBD::Oracle'

The ORACLE_HOME environment variable is not set and I couldn't guess it.
      It must be set to hold the path to an Oracle installation directory
      on this machine (or a machine with a compatible architecture).
      See the appropriate troubleshooting guide for your OS for more information.

''

~$ whereis perl

output

perl: /usr/bin/perl /usr/bin/perl5.30-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/perl /usr/local/lib/x86_64-linux-gnu/perl /etc/perl /usr/share/perl /usr/share/man/man1/perl.1.gz

''

~$ echo $ORACLE_HOME 

output

/u01/app/oracle/product/11.2.0/xe

and

~$ echo $LD_LIBRARY_PATH 

output

/u01/app/oracle/product/11.2.0/xe/lib

i tried re installing perl5, oracle and ora2pg but still getting the same error. I am completely confused.

brian d foy
  • 129,424
  • 31
  • 207
  • 592
Bonzay
  • 740
  • 2
  • 10
  • 29
  • 3
    You are running the install command with `sudo`. It will not inherit the environment from a regular user. See [How to keep environment variables when using sudo](https://stackoverflow.com/q/8633461/2173773) for more information – Håkon Hægland Feb 18 '21 at 19:17

0 Answers0