首页 > 解决方案 > DBD-Oracle (1.74 or 1.76) with oracle instantclient 11.2 on win10 wsl ubuntu

问题描述

我正在尝试在 Windows 10 上的 ubuntu wsl bash 上安装 DBD::Oracle,1.74 或 1.76。

我在 64 架构上,并且 sqlplus64 正在工作,我可以连接到我的数据库!

安装cpanm或安装carton或尝试编译perl Makeperl.pm -l都不起作用,并且总是导致相同的错误。

在 /usr/lib/oracle/11.2/client64 中使用 Oracle -> FAIL 超时(> 60 秒)。使用 --verbose 重试。-> 不适用

我试过以下:

  1. 我试图提升文件夹权限,但没有运气。
  2. 我在公司代理后面,其他软件包安装得很好,但我也尝试在野外互联网上使用移动连接,也没有运气。

这是我的 build.log

cpanm (Menlo) 1.9019 on perl 5.018002 built for x86_64-linux
Work directory is /home/user1/.cpanm/work/1558699904.1138
You have make /usr/bin/make
You have LWP: 6.39
You have LWP::Protocol::https: 6.07
You have /bin/tar: tar (GNU tar) 1.29
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
--> Working on /mnt/c/project/
Entering /mnt/c/project
Configuring /mnt/c/project
-> OK
Checking if you have Try::Tiny 0.24 ... Yes (0.27)
Checking if you have Tie::IxHash 1.23 ... Yes (1.23)
Checking if you have Image::Size 3.300 ... Yes (3.300)
Checking if you have Dancer2 0.203001 ... Yes (0.203001)
Checking if you have HTTP::Request 0 ... Yes (6.11)
Checking if you have Test::Fixture::DBI 0 ... Yes (0.09)
Checking if you have Net::SSLeay 1.88 ... Yes (1.88)
Checking if you have Plack::Middleware::CrossOrigin 0.012 ... Yes (0.012)
Checking if you have Date::Format 2.24 ... Yes (2.24)
Checking if you have Dancer2::Plugin::Database 2.16 ... Yes (2.17)
Checking if you have MIME::Lite 3.030 ... Yes (3.030)
Checking if you have Crypt::JWT 0.018 ... Yes (0.018)
Checking if you have JSON 0 ... Yes (2.90)
Checking if you have LockFile::Simple 0.208 ... Yes (0.208)
Checking if you have DBD::Oracle 1.74 ... No
Checking if you have Date::Language 1.10 ... Yes (1.10)
Checking if you have HTML::TreeBuilder 5.03 ... Yes (5.03)
Checking if you have Date::DayOfWeek 1.22 ... Yes (1.22)
Checking if you have Data::Serializer 0.60 ... Yes (0.60)
Checking if you have Date::Manip 6.54 ... Yes (6.56)
Checking if you have Locale::Maketext 0 ... Yes (1.23)
Checking if you have Time::Piece 0 ... Yes (1.20_01)
Checking if you have Redis 1.991 ... Yes (1.991)
Checking if you have Unicode::String 2.09 ... Yes (2.10)
Checking if you have LWP::Protocol::https 6.06 ... Yes (6.06)
Checking if you have Date::Calc 6.4 ... Yes (6.4)
Checking if you have Test::More 0 ... Yes (0.98)
Checking if you have MooX::Types::MooseLike 0.29 ... Yes (0.29)
Checking if you have MIME::Types 2.13 ... Yes (2.13)
Checking if you have LWP::UserAgent 0 ... Yes (6.15)
Checking if you have Algorithm::Diff 1.1903 ... Yes (1.1903)
Checking if you have Moo 2.002004 ... Yes (2.002004)
Checking if you have Starman 0.4014 ... Yes (0.4014)
==> Found dependencies: DBD::Oracle
Searching DBD::Oracle on mirror index /mnt/c/project/local/cache/modules/02packages.details.txt ...
--> Working on DBD::Oracle
Fetching http://cpan.metacpan.org/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.74.tar.gz
-> OK
Unpacking DBD-Oracle-1.74.tar.gz
Copying DBD-Oracle-1.74.tar.gz to /mnt/c/project/local/cache/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.74.tar.gz
Entering DBD-Oracle-1.74
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.18)
Checking if you have DBI 1.51 ... Yes (1.631)
Configuring DBD-Oracle-1.74
Running Makefile.PL
Multiple copies of Driver.xst found in: /mnt/c/project/local/lib/perl5/x86_64-linux/auto/DBI/ /home/user1/.plenv/versions/5.18.2/lib/perl5/site_perl/5.18.2/x86_64-linux/auto/DBI/ at Makefile.PL line 39.
Using DBI 1.631 (for perl 5.018002 on x86_64-linux) installed in /mnt/c/project/local/lib/perl5/x86_64-linux/auto/DBI/

Configuring DBD::Oracle for perl 5.018002 on linux (x86_64-linux)

Remember to actually *READ* the README file! Especially if you have any problems.

Installing on a linux, Ver#4.4
Using Oracle in /usr/lib/oracle/11.2/client64
-> FAIL Timed out (> 60s). Use --verbose to retry.
-> N/A
Checking dependencies from META.json ...
Checking if you have DBI 1.51 ... Yes (1.631)
Checking if you have warnings 0 ... Yes (1.18)
Checking if you have Exporter 0 ... Yes (5.68)
Checking if you have strict 0 ... Yes (1.07)
Checking if you have DynaLoader 0 ... Yes (1.18)
-> FAIL Configure failed for DBD-Oracle-1.74. See /home/user1/.cpanm/work/1558699904.1138/build.log for details.
-> FAIL Installing the dependencies failed: Module 'DBD::Oracle' is not installed
-> FAIL Bailing out the installation for /mnt/c/project/.

运行perl Makefile.PL -F -v(强制详细)在输出 PATH 后停止:

Using DBI 1.642 (for perl 5.018002 on x86_64-linux) installed in /home/user1/.plenv/versions/5.18.2/lib/perl5/site_perl/5.18.2/x86_64-linux/auto/DBI/

Configuring DBD::Oracle for perl 5.018002 on linux (x86_64-linux)

Remember to actually *READ* the README file! Especially if you have any problems.

Installing on a linux, Ver#4.4
Using Oracle in /usr/lib/oracle/11.2/client64
PATH=/usr/lib/oracle/11.2/client64/bin:/usr/lib/oracle/11.2/client64:/home/user1/.plenv/versions/5.18.2/bin:/home/user1/.plenv/libexec:/home/user1/.plenv/plugins/perl-build/bin:/home/user1/.plenv/shims:/home/user1/.plenv/bin:/home/user1/.nodenv/shims:/home/user1/.nodenv/bin:/home/user1/.rbenv/shims:/home/user1/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_1804.2019.521.0_x64__79rhkp1fndgsc:/mnt/c/Program Files (x86)/Nmap:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath_target_937390:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files/Git/cmd:/mnt/c/Users/user1/AppData/Local/Microsoft/WindowsApps

cpanm --verbose --build-timeout 的最新输出

$ cpanm DBD::Oracle@1.74 --verbose --build-timeout 3600
cpanm (App::cpanminus) 1.7044 on perl 5.018002 built for x86_64-linux
Work directory is /home/user1/.cpanm/work/1559491379.298
You have make /usr/bin/make
You have LWP 6.39
You have /bin/tar: tar (GNU tar) 1.29
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching DBD::Oracle (== 1.74) on cpanmetadb ...
--> Working on DBD::Oracle
Fetching http://backpan.perl.org/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.74.tar.gz ... OK
Unpacking DBD-Oracle-1.74.tar.gz
DBD-Oracle-1.74/
DBD-Oracle-1.74/lib/
DBD-Oracle-1.74/lib/DBD/
DBD-Oracle-1.74/lib/DBD/Oracle.pm
DBD-Oracle-1.74/lib/DBD/Oracle/
DBD-Oracle-1.74/lib/DBD/Oracle/GetInfo.pm
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Win32.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Vms.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Hpux.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Aix.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Sun.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Macos.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Linux.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Cygwin.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting/Win64.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Troubleshooting.pod
DBD-Oracle-1.74/lib/DBD/Oracle/Object.pm
DBD-Oracle-1.74/oci.def
DBD-Oracle-1.74/Makefile.PL
DBD-Oracle-1.74/MANIFEST
DBD-Oracle-1.74/ocitrace.h
DBD-Oracle-1.74/Changes
DBD-Oracle-1.74/LICENSE
DBD-Oracle-1.74/README.help.txt
DBD-Oracle-1.74/README.mkdn
DBD-Oracle-1.74/CONTRIBUTING.mkd
DBD-Oracle-1.74/INSTALL
DBD-Oracle-1.74/Oracle.xs
DBD-Oracle-1.74/CONTRIBUTORS
DBD-Oracle-1.74/META.json
DBD-Oracle-1.74/oci8.c
DBD-Oracle-1.74/META.yml
DBD-Oracle-1.74/Oracle.h
DBD-Oracle-1.74/dbivport.h
DBD-Oracle-1.74/typemap
DBD-Oracle-1.74/t/
DBD-Oracle-1.74/t/23wide_db_al32utf8.t
DBD-Oracle-1.74/t/00versions.t
DBD-Oracle-1.74/t/22nchar_al32utf8.t
DBD-Oracle-1.74/t/31lob.t
DBD-Oracle-1.74/t/lib/
DBD-Oracle-1.74/t/lib/ExecuteArray.pm
DBD-Oracle-1.74/t/10general.t
DBD-Oracle-1.74/t/28array_bind.t
DBD-Oracle-1.74/t/26exe_array.t
DBD-Oracle-1.74/t/14threads.t
DBD-Oracle-1.74/t/rt74753-utf8-encoded.t
DBD-Oracle-1.74/t/23wide_db.t
DBD-Oracle-1.74/t/22nchar_utf8.t
DBD-Oracle-1.74/t/31lob_extended.t
DBD-Oracle-1.74/t/000-report-versions-tiny.t
DBD-Oracle-1.74/t/12impdata.t
DBD-Oracle-1.74/t/36lob_leak.t
DBD-Oracle-1.74/t/24implicit_utf8.t
DBD-Oracle-1.74/t/38taf.t
DBD-Oracle-1.74/t/21nchar.t
DBD-Oracle-1.74/t/70meta.t
DBD-Oracle-1.74/t/15nls.t
DBD-Oracle-1.74/t/39attr.t
DBD-Oracle-1.74/t/rt85886.t
DBD-Oracle-1.74/t/34pres_lobs.t
DBD-Oracle-1.74/t/56embbeded.t
DBD-Oracle-1.74/t/40ph_type.t
DBD-Oracle-1.74/t/55nested.t
DBD-Oracle-1.74/t/30long.t
DBD-Oracle-1.74/t/32xmltype.t
DBD-Oracle-1.74/t/58object.t
DBD-Oracle-1.74/t/50cursor.t
DBD-Oracle-1.74/t/80ora_charset.t
DBD-Oracle-1.74/t/51scroll.t
DBD-Oracle-1.74/t/01base.t
DBD-Oracle-1.74/t/20select.t
DBD-Oracle-1.74/t/nchar_test_lib.pl
DBD-Oracle-1.74/t/23wide_db_8bit.t
DBD-Oracle-1.74/t/60reauth.t
DBD-Oracle-1.74/t/rt13865.t
DBD-Oracle-1.74/t/25plsql.t
DBD-Oracle-1.74/examples/
DBD-Oracle-1.74/examples/japh
DBD-Oracle-1.74/examples/oradump.pl
DBD-Oracle-1.74/examples/ora_explain.pl
DBD-Oracle-1.74/examples/commit.pl
DBD-Oracle-1.74/examples/bind.pl
DBD-Oracle-1.74/examples/curref.pl
DBD-Oracle-1.74/examples/ex.pl
DBD-Oracle-1.74/examples/read_long_via_blob_read.pl
DBD-Oracle-1.74/examples/tabinfo.pl
DBD-Oracle-1.74/examples/proc.pl
DBD-Oracle-1.74/examples/sql
DBD-Oracle-1.74/examples/mktable.pl
DBD-Oracle-1.74/examples/inserting_longs.pl
DBD-Oracle-1.74/examples/README
DBD-Oracle-1.74/mkta.pl
DBD-Oracle-1.74/Todo
DBD-Oracle-1.74/dbdimp.h
DBD-Oracle-1.74/hints/
DBD-Oracle-1.74/hints/macos_syms.pl
DBD-Oracle-1.74/hints/macos_bundle.syms
DBD-Oracle-1.74/hints/macos_lib.syms
DBD-Oracle-1.74/hints/dgux.pl
DBD-Oracle-1.74/hints/svr4.pl
DBD-Oracle-1.74/dbdimp.c
DBD-Oracle-1.74/README
Entering DBD-Oracle-1.74
Checking configure dependencies from META.json
Checking if you have DBI 1.51 ... Yes (1.642)
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.36)
Running Makefile.PL
Configuring DBD-Oracle-1.74 ... Using DBI 1.642 (for perl 5.018002 on x86_64-linux) installed in /home/user1/.plenv/versions/5.18.2/lib/perl5/site_perl/5.18.2/x86_64-linux/auto/DBI/

Configuring DBD::Oracle for perl 5.018002 on linux (x86_64-linux)

Remember to actually *READ* the README file! Especially if you have any problems.

Installing on a linux, Ver#4.4
Using Oracle in /usr/lib/oracle/11.2/client64
BLINKIN CURSOR LONGER THAN 5 HOURS ...

标签: linuxwindowsoracleperlwindows-subsystem-for-linux

解决方案


从我在这里看到的https://github.com/perl-carton/carton/issues/139这可能是问题所在。

将 --build-timeout 添加一个非常大的值以避免超时,您也可以尝试使用 cpan 而不是 cpanm。

编辑:

对于构建的不同部分,存在三个关于超时的参数:

--configure-timeout,--build-timeout,--test-timeout

它们应该作为参数传递给 cpanm。

来源:https ://metacpan.org/pod/distribution/App-cpanminus/bin/cpanm


推荐阅读