{"id":180,"date":"2010-04-11T22:19:03","date_gmt":"2010-04-11T21:19:03","guid":{"rendered":"http:\/\/www.nax.cz\/2010\/04\/11\/dbdoracle-perl-module-installation-on-centos-5\/"},"modified":"2010-04-11T22:19:03","modified_gmt":"2010-04-11T21:19:03","slug":"dbdoracle-perl-module-installation-on-centos-5","status":"publish","type":"post","link":"https:\/\/nax.cz\/?p=180","title":{"rendered":"DBD::Oracle perl module installation on CentOS 5"},"content":{"rendered":"<p>I tell you, to install DBD::Oracle isn&#8217;t an easy job, especially if some college already tried on a same box. That was exactly situation I faced lately on one box. I needed that DBI driver really badly because I needed to migrate set of scripts to manipulate our data from purly storage server to dedicated Linux box. Not a big deal &#8211; script are written in perl, so no problem with different platform &#8211; except dam Oracle perl module!<\/p>\n<p>OK, I tried to find some rpm with that module, but was out of luck. <\/p>\n<p>Never mind, with Perl there is always <a href=\"www.cpan.org\">CPAN repository<\/a>.<\/p>\n<pre>\n# perl -MCPAN -e shell\ncpan> install DBD::Oracle\n<\/pre>\n<p>This will probably fail, because you need first to have setup a few environemt variable. The most obvious is <em>ORACLE_HOME<\/em> which point to the directory with libraries. Unfortunately even if I had correct lib there, the build failed with following LD error:<\/p>\n<p><em>\/usr\/bin\/ld: skipping incompatible \/usr\/lib\/oracle\/10.2.0.4\/client\/lib\/libclntsh.so when searching for -lclntsh<br \/>\n\/usr\/bin\/ld: cannot find -lclntsh<br \/>\ncollect2: ld returned 1 exit status<br \/>\nmake: *** [blib\/arch\/auto\/DBD\/Oracle\/Oracle.so] Error 1<br \/>\n  PYTHIAN\/DBD-Oracle-1.24a.tar.gz<br \/>\n  \/usr\/bin\/make &#8212; NOT OK<\/em><\/p>\n<p>The reason for this error is wrong platform of installed Oracle libraries, as described in <a href=\"http:\/\/www.orafaq.com\/forum\/m\/431326\/0\/?srch=libclntsh.so+incompatible+for+DBD%3A%3AOracle#msg_431326\">this thread<\/a><\/p>\n<p>You can find out platform easily:<br \/>\n<em>uname -a<br \/>\nLinux hostname 2.6.18-128.1.10.el5xen #1 SMP Thu May 7 11:07:18 EDT 2009 x86_64 x86_64 x86_64 GNU\/Linux<\/em><\/p>\n<p>Mine libraries was supposed for 32bit which usually works with 64bit system &#8211; but not in this case.<\/p>\n<p>Next error was also a bit confusing:<\/p>\n<p><em>t\/10general.t &#8230;&#8230;&#8230;.. Can&#8217;t connect to data source &#8218;MYDB&#8216; because I can&#8217;t work out what driver to use (it doesn&#8217;t seem to contain a &#8218;dbi:driver:&#8216; prefix and the DBI_DRIVER env var is not set) at t\/10general.t line 22<\/em><\/p>\n<p>Strange, but I had to do this:<\/p>\n<pre>\nexport DBI_DRIVER=\"Oracle\"\n<\/pre>\n<p>It is also a good idea to read carefully a README file. It helps you avoid other errors during the tests. I came across an error that I do not have alter table privilege. Unfortunately the only workaround I found is just delete the test (<em>t<\/em> subfolder in you <em>.cpan<\/em> cache).<\/p>\n<p>Next challenge is to do <a href=\"http:\/\/www.oracleappsblog.com\/index.php\/forum\/viewthread\/221\/#290\">installation of sqlldr utility<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I tell you, to install DBD::Oracle isn&#8217;t an easy job, especially if some college already tried on a same box. That was exactly situation I faced lately on one box. I needed that DBI driver really badly because I needed to migrate set of scripts to manipulate our data from purly storage server to dedicated [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,43],"tags":[],"class_list":["post-180","post","type-post","status-publish","format-standard","hentry","category-linux","category-perl"],"_links":{"self":[{"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/posts\/180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=180"}],"version-history":[{"count":0,"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/posts\/180\/revisions"}],"wp:attachment":[{"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}