How do you install perl DBD::Oracle on OSX Snow Leopard 10.6 -
i'm trying connect oracle 10.2.0.4 on remote system intel mac running osx 10.6 snow leopard. i've tried using perl cpan install dbd::oracle (dbi worked ok) compilation errors. provide easy follow guide?
getting mac install of perl play nicely oracle bit of pain - once it's running fantastic, getting running little frustrating..
the below has worked me on few different intel macs, there superfluous steps in there , not going same other platforms.
this require use of shell, root user , bit of cpaning - nothing onerous
first off create directory oracle pap - libraries, instant client etc
sudo mkdir /usr/oracle_instantclient64
download , extract 64 bit instant client packages oracle above directory
create symlink within directory 1 of files in there
sudo cd /usr/oracle_instantclient64 sudo ln -s /usr/oracle_instantclient64/libclntsh.dylib.10.1 libclntsh.dylib
the following dir hardcoded oracle instant client - god knows why - need create , symlink it
sudo mkdir -p /b/227/rdbms/ sudo cd /b/227/rdbms/ sudo ln -s /usr/oracle_instantclient64/ lib
need add couple of environment variables, edit /etc/profile , add them exist users:
export oracle_home=/usr/oracle_instantclient64 export dyld_library_path=/usr/oracle_instantclient64
now try , install dbd::oracle through cpan - fail, means dependencies downloaded , retrieves module us
sudo perl -mcpan -e shell install dbd::oracle
when fails exit cpan , head .cpan/build dir - if used automatic config of cpan it'll be
cd ~/.cpan/build
if didn't auto configure can find build directory following command in cpan
o conf build_dir
once in build dir dbd::oracle dir has been created (it'll called dbd-oracle-1.28-?) , cd it.
now need switch root user. root isn't enabled default in osx - details on enabling see post on apple website
once logged in root need set above environment variables root:
export oracle_home=/usr/oracle_instantclient64 export dyld_library_path=/usr/oracle_instantclient64
now while still logged in root need run makefile module, make, install
perl makefile.pl make make install
assuming worked without error log out of root: we're dbd'd up! if didn't work it's time bust out google on whatever errors you're seeing
now install dbi module
sudo perl -mcpan -e shell install dbi
now you're set - enjoy perly oracley new life
additional info user852637:
correction step
perl makefile.pl make install
the last step should
make install
during make, may encounter error looks :
lipo: can't open input file: /var/tmp//ccievtzm.out (no such file or directory)
to correct must edit file "makefile" created after "perl makefile.pl" step , remove occurrences of following text :
-arch ppc
this eliminate error.
the same error described in (2.) occur during installation of dbi module. must edit
makefile
created afterperl makefile.pl
step , remove occurrences of following text :-arch ppc
Comments
Post a Comment