我正在尝试使用Oracle即时连接从perl连接到Oracle
数据库。
错误消息是:
install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains:
/Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12
/Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12
/Library/Perl/Updates/5.12.4/darwin-thread-multi-2level /Library/Perl/Updates/5.12.4
/System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12
/System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .)
我该如何解决这个问题?
cpan DBD :: Oracle也存在一些问题:
CPAN.pm: Going to build P/PY/PYTHIAN/DBD-Oracle-1.68.tar.gz
Multiple copies of Driver.xst found in: /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBI/ /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/DBI/ at Makefile.PL line 39
Using DBI 1.631 (for perl 5.012004 on darwin-thread-multi-2level) installed in /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBI/
Configuring DBD::Oracle for perl 5.012004 on darwin (darwin-thread-multi-2level)
Remember to actually *READ* the README file! Especially if you have any problems.
Trying to find an ORACLE_HOME
Found /Library/Oracle/instantclient_11_2 /Library/Oracle/instantclient_11_2 /Library/Oracle/instantclient_11_2 /Library/Oracle/instantclient_11_2 /Library/Oracle/instantclient_11_2 /Library/Oracle/instantclient_11_2
WARNING: Setting ORACLE_HOME env var to /Library/Oracle/instantclient_11_2 for you.
WARNING: If these tests fail you may have to set ORACLE_HOME yourself!
Installing on a darwin, Ver#12.0
Using Oracle in /Library/Oracle/instantclient_11_2
dyld: Library not loaded: /ade/b/3572816174/oracle/sqlplus/lib/libsqlplus.dylib
Referenced from: /Library/Oracle/instantclient_11_2/sqlplus
Reason: no suitable image found. Did find:
/usr/lib/libsqlplus.dylib: mach-o, but wrong architecture
If sqlplus failed due to a linker/symbol/relocation/library error or similar problem
then it's likely that you've not configured your environment correctly.
Specifically, your DYLD_LIBRARY_PATH environment variable
set to include the directory containing the Oracle libraries.
I'm having trouble finding your Oracle version number... trying harder
WARNING: I could not determine Oracle client version so I'll just
default to version 8.0.0.0. Some features of DBD::Oracle may not work.
Oracle version based logic in Makefile.PL may produce erroneous results.
You can use "perl Makefile.PL -V X.Y.Z" to specify a your client version.
Oracle version 8.0.0.0 (8.0)
DBD::Oracle no longer supports Oracle client versions before 9.2
Try a version before 1.25 for 9 and 1.18 for 8! at Makefile.PL line 271.
Warning: No success on command[/usr/bin/perl Makefile.PL]
PYTHIAN/DBD-Oracle-1.68.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
答案 0 :(得分:0)
问题是,由于对DYLD *变量的安全性更改,El Capitan目前不支持通过CPAN安装perl库。
您必须手动编译模块并做一些解决方法,这是一步一步的说明。