toledotown has asked for the wisdom of the Perl Monks concerning the following question:

Hello and good morning.

I am attempting to install the Perl module DBD::Oracle and the problem I am having is that it only installs under root after compiling! I am wanting it to install in a standard path that exists in my @INC array like /usr/local/lib64/perl5.

[root@server ~]# find / -name Oracle.pm /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle.pm

I have tried to set the PREFIX when running perl Makefile.PL but that does not appear to have any affect.

Here are the steps I am taking. The odd thing is this issue didn't occur when I did this install on the test server prior to production :(

There are no errors during make or make test just some minor warnings which also were present during the test install which was successful.

cd /root/.cpan/build/DBD-Oracle-1.74-XSQX0x/ export C_INCLUDE_PATH="/home/oracle/product/12.1.0.2/sdk/include" export ORACLE_BASE=/home/oracle export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2 export LD_LIBRARY_PATH=/home/oracle/product/12.1.0.2/lib perl Makefile.PL 'PREFIX=/usr/local/lib64/perl5' make make test make install

I have also tried setting some values in CPAN such as makepl_arg and PREFIX.

Any help is greatly appreciated.

Replies are listed 'Best First'.
Re: DBD::Oracle only installs under /root ?
by marto (Cardinal) on Mar 19, 2018 at 13:50 UTC

      Hey thanks, that seemed to get me part of the way there! Now it is installed in the right path but it added a bunch of directories....smh

      /usr/local/lib64/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle.pm

      My @INC array is expecting it explicitly at /usr/local/lib64/perl5/DBD/Oracle.pm

      Any ideas on this new development? My dev team doesn't want to change the @INC array as that would make this server a snowflake in terms of development environment lol. I can see their point..

        This does look odd. Can you respond to the which perl when run as root, along with the output of perl -V (please use code tags as specified when posting)?