我想在Cygwin中安裝DBD::Oracle
模塊。我已經下載了C:\Oracle\instantclient_12_1
的Oracle Instant Client(版本12.1)。我還下載了SDK和SQLPlus,並將它們提取到instantclient_12_1目錄中。我將我的ORACLE_HOME路徑設置爲export ORACLE_HOME=/cygdrive/c/Oracle/instantclient_12_1
,將LD_LIBRARY_PATH設置爲export LD_LIBRARY_PATH=/cygdrive/c/Oracle/instantclient_12_1/lib
。當我嘗試安裝軟件包時,出現以下錯誤:需要幫助在Cygwin上安裝DBD :: Oracle
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]
'YAML' not installed, will not store persistent state
PYTHIAN/DBD-Oracle-1.66.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
爲什麼安裝程序無法檢測到版本?我該如何成功安裝模塊?
編輯:在下面的建議,我試過perl Makefile.PL -V 12.1.0
。我得到的輸出:
Installing on a cygwin, Ver#1.7
Using Oracle in /cygdrive/c/Oracle/instantclient_12_1
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 PATH environment variable
set to include the directory containing the Oracle libraries.
Forcing Oracle version to be treated as 12.1.0
Oracle version 12.1.0 (12.1)
Using OCI directory 'sdk'
client_version=12.1
DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"12.1.0\" -DORA_OCI_102 -DORA_OCI_112
Checking for functioning wait.ph
System: perl5.014004 cygwin_nt-6.1 yaakov04 1.7.18(0.26353) 2013-03-07 19:25 x86_64 cygwin
Compiler: gcc -O3 -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -fstack-protector
Linker: /usr/bin/ld
Sysliblist:
Checking if your kit is complete...
Looks good
LD_RUN_PATH=/cygdrive/c/Oracle/instantclient_12_1/lib:/cygdrive/c/Oracle/instantclient_12_1/rdbms/lib
Using DBD::Oracle 1.66.
Using DBD::Oracle 1.66.
Using DBI 1.623 (for perl 5.014004 on cygwin-thread-multi) installed in /usr/lib/perl5/vendor_perl/5.14/x86_64-cygwin-threads/auto/DBI/
Generating a GNU-style Makefile
Writing Makefile for DBD::Oracle
Writing MYMETA.yml and MYMETA.json
但make, make test and make install
後,該模塊仍不能正確安裝,我不能運行使用這個任何腳本(make test
返回37/38失敗的案例)。我無法看到如何繼續。
http://stackoverflow.com/a/11408088/1251660 – slayedbylucifer
這個鏈接的問題不涉及cygwin。我需要知道我設置的ORACLE_HOME應該是DOS格式還是POSIX格式。另外,我不能簡單地從cpan安裝模塊,而不是下載並手動安裝它? – user828647
鏈接的答案提到設置'LD_LIBRARY_PATH',你沒有提到這樣做?你有沒有設定它,它的價值是什麼? – Joel