Reputation: 359
I get the error oci.h missing on running the installation:
cpan DBD::Oracle
on OS X 10.8
.
How can I fix this?
The specific error message is:
/usr/bin/perl -p -e "s/~DRIVER~/Oracle/g" /Library/Perl/5.12/darwin-thread-multi- 2level/auto/DBI/Driver.xst > Oracle.xsi
/usr/bin/perl /System/Library/Perl/5.12/ExtUtils/xsubpp -typemap /System/Library/Perl/5.12/ExtUtils/typemap -typemap typemap Oracle.xs > Oracle.xsc && mv Oracle.xsc Oracle.c
clang -c -I/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBI -arch i386 -arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include -Os -DVERSION=\"1.68\" -DXS_VERSION=\"1.68\" "-I/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.3\" -DORA_OCI_102 -DORA_OCI_112 Oracle.c
In file included from Oracle.xs:1:
./Oracle.h:37:10: fatal error: 'oci.h' file not found
Upvotes: 2
Views: 3287
Reputation: 61
I had the same issue and I managed to solve it by adding the include
directory of the oracle instance client sdk to C_INCLUDE_PATH
env variable and installing it from the source directory:
tar xzf DBD-Oracle-1.74.tar.gz
cd DBD-Oracle-1.74
export C_INCLUDE_PATH="/opt/oracle/instantclient_12_2/sdk/include"
perl Makefile.PL
make
make install
Upvotes: 2
Reputation: 1996
It looks like you're trying to install DBD::Oracle without having installed the appropriate Oracle client prerequisite. Consult DBD::Oracle::Troubleshooting::Macos, DBD::Oracle installation nodes, ensure that the require environment variables are setup. It's easier to install this module outside of the cpan tool.
Upvotes: 0