Hi, I was asked to help at the client site I'm working at to get DBD::Oracle installed on a CentOS machine.
They had tried to install it via the CPAN shell and found that the installer was hanging. I went into /root/.cpan/build/DBD-Oracle-1.22-XXXXXXX and tried perl Makefile.PL and found that hung too. I added some 'print "I'm up to here OK\n"' messages to the makefile, and found that it was the `$sqlplus_exe -S /nolog \...@define.sql 2>&1` which was having the problems - when I tried running this outside the makefile I found it was due to the fact that the sqlplus binary was setuid to an oracle user. On the other systems I've checked it's not setuid, so expect it shouldn't be - but I didn't know if it was that way for some valid local reason. There does seem to be a lot of cargo-cult sysadminning at this company due to the IS manager's lack of knowledge and unwillingness to delegate. The effect of the sqlplus binary being setuid to oracle who did not have permission to read the define.sql file because it was in /root/.cpan/build/DBD-Oracle-1.22-XXXXXXX/define.sql I tried creating it in /tmp/define.sql but for some reason it wasn't happy with that either. As time was an issue I went for a quick-win solution. I managed to work around the setuid by patching the Makefile.PL thus: 1516,1519c1516,1519 < open FH, ">define.sql" or warn "Can't create define.sql: $!"; < print FH "DEFINE _SQLPLUS_RELEASE\nQUIT\n"; < close FH; < my $sqlplus_release = `$sqlplus_exe -S /nolog \...@define.sql 2>&1`; --- > # open FH, ">define.sql" or warn "Can't create define.sql: $!"; > # print FH "DEFINE _SQLPLUS_RELEASE\nQUIT\n"; > # close FH; > my $sqlplus_release = `echo -e "DEFINE _SQLPLUS_RELEASE\nQUIT\n" | > sqlplus -S /nolog 2>&1`; I hope this helps, John