Fixing the Dreaded *.mk Error in DBD::Oracle insalls

Posted in: Technical Track

If you have ever had this message:

Unable to locate an, or other suitable *.mk
file in your Oracle installation. (I looked in…)

It can be a very frustrating one to track down.

I have seen it across almost all platforms and versions of Oracle but what it boils down to is that you are quite simply:

1) Missing some part of your Oracle Client or
2) Part of your Oracle Client is some place where the Makefile.PL cannot find it or
3) Part of your Oracle Client is buried inside a resource or a symbolic link or
4) Oracle has moved or removed files that DBD::Oracle needs to compile.

Well what to do then??

There is no 100% answer for this problem but there seems to be two main scenarios where I have encountered this and have come up with somewhat of a solution:

1) If you are attempting to build against any of Oracle’s Instantclients you most likely have only have the basic install available. To correct this simply make sure you get the SDK and SQLPlus downloads as well and try compiling again.

2) If you are installing against an 11g instance (Oracle seems to have moved a number of things about depending on the platform) then you best bet would be to give this a try:

Perl Makefile.PL -l

which forces the compile to user the “direct link” method thus bypassing the *.mk files. Expect much more output and a longer compile time when you take this route but it should work exactly the same.

John Scoles



Want to talk with an expert? Schedule a call with our team to get the conversation started.

7 Comments. Leave new

Hi John,

I had the same problem to, but fortunately your help made me pass to make test. Im trying to compile to an 11G install and it seems that Oracle removed lib32. Now I problably need a 64 bit perl and all the required modules. Dont know if they exist.

See ya,


Thanks alot John , had the #2 problem compiling it against oracle 11g , great work !



the step perl Makefile.PL -l helped me pass to the next step.

Now when trying to compile it, I get the following error message:
ld: fatal: file : open failed: No such file or directory
ld: fatal: file /opt/app/oracle/product/11.2/lib/ wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to blib/arch/auto/DBD/Oracle/
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/Oracle/] Error 1

Any hints?

Thanks, Boris


hey John,

Thanks alot. It helped me.
Great work.


Thank you. it resolved my issue


Has anyone compiled DBD::ORacle in the past 5 years? My god. We’re at 12.2 now, and I find practcially nothing on this. Has perl / cpan module development taken such a huge step backwards? The README file is no longer a README file as such. The INSTALL barely mentions anything useful.


“export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib/ ORACLE_HOME=/usr/lib/oracle/12.1/client64 ; perl Makefile.PL -l ; make ; make install” at least did for me (ubuntu 64bit & instantclient 12 / 64bit) smoothly


Leave a Reply

Your email address will not be published. Required fields are marked *