我尝试在64位Solaris环境中安装CGI,DBI和DBD::Oracle以及驱动程序,但收效甚微。我遇到的错误数量令人难以置信,我尝试过的解决方案解决方案的数量 - 从更改环境变量,更改目录引用,移动和复制文件,更改编译器等等 - 更糟糕。最糟糕的是,在最新版本的Solaris中安装所述模块的文档很少。
以下是我们一直在进行的初步步骤。
首先我们转到http://search.cpan.org/。然后我们下载:
接下来我们打开一个终端窗口,切换到root,然后导航到我们的" Downloads"文件夹中。
从这里我们解压缩以前下载的文件(此处没有问题):
gunzip -c CGI.pm-3.59.tar.gz |tar xvf -
gunzip -c DBI-1.621.tar.gz |tar xvf -
gunzip -c DBD-Oracle-1.44.tar.gz |tar xvf -
然后我们存档tar文件以防以后需要它们。
mkdir archive_tar
mv *.gz $HOME/Downloads/archive_tar
这里有点混乱,因为我们不确定这些步骤是否完全必要。基本上,我们相信我们需要设置正确的Perl(最新的Oracle需要64位,默认使用的Perl是32位)。
which perl
以确定您正在使用的Perl的当前版本。它应该表明您使用的是默认版本(或32位)。file /opt/oracle/rdbms/perl/bin/perl
ELF 64-bit LSB executable AMD64 Version 1 [SSE2 SSE FXSR CMOV FPU], dynamically linked, not stripped<
。PATH
变量:export PATH=/opt/oracle/rdbms/perl/bin:$PATH
which perl
。确认现在显示Perl位于opt/oracle/rdbms/perl/bin/perl
。输入perl -V
,如果显示错误,请设置以下变量:
export PERL5LIB=/opt/oracle/rdbms/perl/lib/5.10.0
export PERLLIB=/opt/oracle/rdbms/perl/lib/5.10.0
现在我们设置cc
(编译器),以便我们可以安装CGI / DBI / DBD-Oracle。
cc --version
以验证是否找不到cc
。bzcat SolarisStudio12.3-solaris-sparc-bin.tar.bz2 | tar xf -
.bz2
文件移至我们之前创建的存档文件夹:mv SolarisStudio12.3-solaris-sparc-bin.tar.bz2 $HOME/Downloads/archive_tar
export PATH=$PATH:/home/oracle/Downloads/SolarisStudio12.3-solaris-sparc-bin/solarisstudio12.3/bin
cc --version
,此命令不应执行任何操作(可能会发出一些警告),但它不再说cc not found
。这里我们开始安装模块和驱动程序,从CGI模块开始:
$HOME/Downloads/CGI.pm-3.59
perl Makefile.PL
我们需要将make文件更改为指向正确的位置。
vi Makefile
:%s,../lib/site_perl/5.10.0,/opt/oracle/rdbms/perl/lib/site_perl/5.10.0,g
:%s,../lib/5.10.0,/opt/oracle/rdbms/perl/lib/5.10.0,g
现在输入make
make install
$HOME/Downloads/DBI-1.621
。perl Makefile.PL
同样,我们需要将此make文件更改为指向正确的位置。
vi Makefile
:%s,../lib/site_perl/5.10.0,/opt/oracle/rdbms/perl/lib/site_perl/5.10.0,g
:%s,../lib/5.10.0,/opt/oracle/rdbms/perl/lib/5.10.0,g
然而,这些改变了我们不想改变的两条线。对MAKEMAKER
和XSUBPPDIR
进行查找,然后将其设置回以下值。
MAKEMAKER = /opt/oracle/rdbms/perl/lib/5.10.0/ExtUtils/MakeMaker.pm
XSUBPPDIR = /opt/oracle/rdbms/perl/lib/5.10.0/ExtUtils
现在输入make
make install
$HOME/Downloads/DBD-Oracle-1.44
perl Makefile.PL
这基本上是我们在Makefile中的第21行use DBI 1.51;
处收到致命错误,并且跟踪堆栈表明@INC
无法找到DBI.pm
。这就是为什么我试图移动二进制库文件。此时我无法访问Solaris盒子,所以我无法重新发布确切的错误代码,我应该能够包括那个星期二(我最早可以回到机器上)。有没有人对此有任何想法?
打开终端窗口并以root
用户身份安装以下软件包:
pkg install system/header
pkg install gcc-45
pkg install developer/build/gnu-make
pkg install archiver/gnu-tar
导航至$ oracle_home cd $oracle_home
并:
mkdir /apps
mkdir /apps/twiki-root
mkdir /apps/twiki-root/perlmodules
修改PERL5LIB
环境变量:
export PERL5LIB=/apps/twiki-root/perlmodules
echo $PERL5LIB
打开CPAN shell并更新它:
/usr/perl5/bin/perlgcc -MCPAN -e shell
如果这是第一次,请按return
接受自动配置。
现在输入以下命令来修改CPAN的镜像位置:
o conf urllist shift
o conf urllist
o conf urllist unshift http://mirror.ox.ac.uk/sites/www.cpan.org/
o conf urllist
o conf commit
install Bundle::CPAN
reload cpan
打开Config.pm
文件并按如下所述进行修改:
cd /usr/perl5/5.12/lib/CPAN/
vi Config.pm
修改这些值:
'make' => q[/usr/sfw/bin/gmake],
'make_install_make_command' => q[/usr/sfw/bin/gmake],
'makepl_arg' => q[LIB=/apps/twiki-root/perlmodules PREFIX=/apps/twiki-root/perlmodules INSTALLMAN3DIR=/apps/twiki-root/perlmodules/man/man3],
'mbuild_arg' => q[--install_base /apps/twiki-root/perlmodules],
'mbuild_install_arg' => q[--install_base /apps/twiki-root/perlmodules],
'mbuildpl_arg' => q[--install_base /apps/twiki-root/perlmodules],
'prefs_dir' => q[~/.cpan/prefs],
'tar' => q[/usr/sfw/bin/gtar],
写入/保存到文件并退出→:wq
确保已设置gcc
:
通过以下方式验证:which gcc
现在再次打开CPAN shell并开始安装DBI模块。
/usr/perl5/bin/perlgcc -MCPAN -e shell
install DBI
这就是一切只是废话的地方。错误:
Reading '/home/oracle/.cpan/Metadata'
Database was generated on Sun, 03 Jun 2012 22:27:03 GMT
Running install for module 'DBI'
Running make for T/TI/TIMB/DBI-1.621.tar.gz
Subroutine config redefined at /usr/perl5/5.12/lib/CPAN/LWP/UserAgent.pm line 12.
Subroutine get_basic_credentials redefined at /usr/perl5/5.12/lib/CPAN/LWP/UserAgent.pm line 23.
Subroutine no_proxy redefined at /usr/perl5/5.12/lib/CPAN/LWP/UserAgent.pm line 32.
Subroutine mirror redefined at /usr/perl5/5.12/lib/CPAN/LWP/UserAgent.pm line 67.
Fetching with HTTP::Tiny:
http://mirror.ox.ac.uk/sites/www.cpan.org/authors/id/T/TI/TIMB/DBI-1.621.tar.gz
Fetching with HTTP::Tiny:
http://mirror.ox.ac.uk/sites/www.cpan.org/authors/id/T/TI/TIMB/CHECKSUMS
Checksum for /home/oracle/.cpan/sources/authors/id/T/TI/TIMB/DBI-1.621.tar.gz ok
Scanning cache /home/oracle/.cpan/build for sizes
............................................................................DONE
CPAN.pm: Building T/TI/TIMB/DBI-1.621.tar.gz
*** Your LANG environment variable is set to 'en_US.UTF-8'
*** This may cause problems for some perl installations.
*** If you get test failures, please try again with LANG unset.
*** If that then works, please email dbi-dev@perl.org with details
*** including the output of 'perl -V'
Creating test wrappers for DBD::Gofer:
t/zvg_01basics.t
t/zvg_02dbidrv.t
t/zvg_03handle.t
t/zvg_04mods.t
t/zvg_05concathash.t
t/zvg_06attrs.t
t/zvg_07kids.t
t/zvg_08keeperr.t
t/zvg_09trace.t
t/zvg_10examp.t
t/zvg_11fetch.t
t/zvg_12quote.t
t/zvg_13taint.t
t/zvg_14utf8.t
t/zvg_15array.t
t/zvg_16destroy.t
t/zvg_19fhtrace.t
t/zvg_20meta.t
t/zvg_30subclass.t
t/zvg_31methcache.t
t/zvg_35thrclone.t
t/zvg_40profile.t
t/zvg_41prof_dump.t
t/zvg_42prof_data.t
t/zvg_43prof_env.t
t/zvg_48dbi_dbd_sqlengine.t
t/zvg_49dbd_file.t
t/zvg_50dbm_simple.t
t/zvg_51dbm_file.t
t/zvg_52dbm_complex.t
t/zvg_60preparse.t
t/zvg_65transact.t
t/zvg_70callbacks.t
t/zvg_72childhandles.t
t/zvg_80proxy.t
t/zvg_85gofer.t
t/zvg_86gofer_fail.t
t/zvg_87gofer_cache.t
t/zvg_90sql_type_cast.t
Creating test wrappers for DBI::SQL::Nano:
t/zvn_48dbi_dbd_sqlengine.t
t/zvn_49dbd_file.t
t/zvn_50dbm_simple.t
t/zvn_51dbm_file.t
t/zvn_52dbm_complex.t
t/zvn_85gofer.t
Creating test wrappers for DBI::PurePerl:
t/zvp_01basics.t
t/zvp_02dbidrv.t
t/zvp_03handle.t
t/zvp_04mods.t
t/zvp_05concathash.t
t/zvp_06attrs.t
t/zvp_07kids.t
t/zvp_08keeperr.t
t/zvp_09trace.t
t/zvp_10examp.t
t/zvp_11fetch.t
t/zvp_12quote.t
t/zvp_13taint.t
t/zvp_14utf8.t
t/zvp_15array.t
t/zvp_16destroy.t
t/zvp_19fhtrace.t
t/zvp_20meta.t
t/zvp_30subclass.t
t/zvp_31methcache.t
t/zvp_35thrclone.t
t/zvp_40profile.t
t/zvp_41prof_dump.t
t/zvp_42prof_data.t
t/zvp_43prof_env.t
t/zvp_48dbi_dbd_sqlengine.t
t/zvp_49dbd_file.t
t/zvp_50dbm_simple.t
t/zvp_51dbm_file.t
t/zvp_52dbm_complex.t
t/zvp_60preparse.t
t/zvp_65transact.t
t/zvp_70callbacks.t
t/zvp_72childhandles.t
t/zvp_80proxy.t
t/zvp_85gofer.t
t/zvp_86gofer_fail.t
t/zvp_87gofer_cache.t
t/zvp_90sql_type_cast.t
Creating test wrappers for DBD::Gofer + DBI::SQL::Nano:
t/zvxgn_48dbi_dbd_sqlengine.t
t/zvxgn_49dbd_file.t
t/zvxgn_50dbm_simple.t
t/zvxgn_51dbm_file.t
t/zvxgn_52dbm_complex.t
t/zvxgn_85gofer.t
Creating test wrappers for DBD::Gofer + DBI::PurePerl:
t/zvxgp_01basics.t
t/zvxgp_02dbidrv.t
t/zvxgp_03handle.t
t/zvxgp_04mods.t
t/zvxgp_05concathash.t
t/zvxgp_06attrs.t
t/zvxgp_07kids.t
t/zvxgp_08keeperr.t
t/zvxgp_09trace.t
t/zvxgp_10examp.t
t/zvxgp_11fetch.t
t/zvxgp_12quote.t
t/zvxgp_13taint.t
t/zvxgp_14utf8.t
t/zvxgp_15array.t
t/zvxgp_16destroy.t
t/zvxgp_19fhtrace.t
t/zvxgp_20meta.t
t/zvxgp_30subclass.t
t/zvxgp_31methcache.t
t/zvxgp_35thrclone.t
t/zvxgp_40profile.t
t/zvxgp_41prof_dump.t
t/zvxgp_42prof_data.t
t/zvxgp_43prof_env.t
t/zvxgp_48dbi_dbd_sqlengine.t
t/zvxgp_49dbd_file.t
t/zvxgp_50dbm_simple.t
t/zvxgp_51dbm_file.t
t/zvxgp_52dbm_complex.t
t/zvxgp_60preparse.t
t/zvxgp_65transact.t
t/zvxgp_70callbacks.t
t/zvxgp_72childhandles.t
t/zvxgp_80proxy.t
t/zvxgp_85gofer.t
t/zvxgp_86gofer_fail.t
t/zvxgp_87gofer_cache.t
t/zvxgp_90sql_type_cast.t
Creating test wrappers for DBI::SQL::Nano + DBI::PurePerl:
t/zvxnp_48dbi_dbd_sqlengine.t
t/zvxnp_49dbd_file.t
t/zvxnp_50dbm_simple.t
t/zvxnp_51dbm_file.t
t/zvxnp_52dbm_complex.t
t/zvxnp_85gofer.t
Creating test wrappers for DBD::Gofer + DBI::SQL::Nano + DBI::PurePerl:
t/zvxgnp_48dbi_dbd_sqlengine.t
t/zvxgnp_49dbd_file.t
t/zvxgnp_50dbm_simple.t
t/zvxgnp_51dbm_file.t
t/zvxgnp_52dbm_complex.t
t/zvxgnp_85gofer.t
Checking if your kit is complete...
Looks good
Have /usr/perl5/5.12/lib/Sun/Solaris/PerlGcc
Want /usr/perl5/5.12/lib/i86pc-solaris-64int
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [PerlGcc]
Config says: [i86pc-solaris-64int]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
I see you're using perl 5.012003 on i86pc-solaris-64int, okay.
Remember to actually *read* the README file!
Use 'make' to build the software (dmake or nmake on Windows).
Then 'make test' to execute self tests.
Then 'make install' to install the DBI and then delete this working
directory before unpacking and building any DBD::* drivers.
Writing Makefile for DBI
Writing MYMETA.yml and MYMETA.json
/usr/perl5/5.12/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/lib/DBI
rm -f blib/lib/DBI/Changes.pm
cp Changes blib/lib/DBI/Changes.pm
cp Driver_xst.h blib/arch/auto/DBI/Driver_xst.h
cp lib/DBI/Gofer/Response.pm blib/lib/DBI/Gofer/Response.pm
cp lib/DBD/Proxy.pm blib/lib/DBD/Proxy.pm
cp lib/DBI/Util/_accessor.pm blib/lib/DBI/Util/_accessor.pm
cp lib/DBI/Gofer/Transport/Base.pm blib/lib/DBI/Gofer/Transport/Base.pm
cp lib/DBD/DBM.pm blib/lib/DBD/DBM.pm
cp DBIXS.h blib/arch/auto/DBI/DBIXS.h
cp dbixs_rev.pl blib/lib/dbixs_rev.pl
cp lib/DBI/Const/GetInfoType.pm blib/lib/DBI/Const/GetInfoType.pm
cp lib/DBI/Gofer/Serializer/DataDumper.pm blib/lib/DBI/Gofer/Serializer/DataDumper.pm
cp lib/DBI/DBD/Metadata.pm blib/lib/DBI/DBD/Metadata.pm
cp lib/DBI/Const/GetInfo/ODBC.pm blib/lib/DBI/Const/GetInfo/ODBC.pm
cp lib/DBD/Gofer/Transport/pipeone.pm blib/lib/DBD/Gofer/Transport/pipeone.pm
cp lib/DBI/ProfileDumper/Apache.pm blib/lib/DBI/ProfileDumper/Apache.pm
cp lib/DBD/File.pm blib/lib/DBD/File.pm
cp Driver.xst blib/arch/auto/DBI/Driver.xst
cp lib/DBD/File/Roadmap.pod blib/lib/DBD/File/Roadmap.pod
cp lib/DBI/Util/CacheMemory.pm blib/lib/DBI/Util/CacheMemory.pm
cp lib/DBI/ProfileSubs.pm blib/lib/DBI/ProfileSubs.pm
cp lib/DBD/NullP.pm blib/lib/DBD/NullP.pm
cp dbi_sql.h blib/arch/auto/DBI/dbi_sql.h
cp lib/DBD/Gofer.pm blib/lib/DBD/Gofer.pm
cp lib/DBD/File/HowTo.pod blib/lib/DBD/File/HowTo.pod
cp dbd_xsh.h blib/arch/auto/DBI/dbd_xsh.h
cp dbivport.h blib/arch/auto/DBI/dbivport.h
cp lib/DBI/DBD/SqlEngine/HowTo.pod blib/lib/DBI/DBD/SqlEngine/HowTo.pod
cp dbixs_rev.h blib/arch/auto/DBI/dbixs_rev.h
cp lib/DBD/Gofer/Transport/corostream.pm blib/lib/DBD/Gofer/Transport/corostream.pm
cp lib/DBD/Gofer/Transport/Base.pm blib/lib/DBD/Gofer/Transport/Base.pm
cp lib/DBI/FAQ.pm blib/lib/DBI/FAQ.pm
cp lib/DBD/Gofer/Policy/rush.pm blib/lib/DBD/Gofer/Policy/rush.pm
cp lib/DBI/SQL/Nano.pm blib/lib/DBI/SQL/Nano.pm
cp lib/DBI/Gofer/Request.pm blib/lib/DBI/Gofer/Request.pm
cp lib/DBI/Const/GetInfo/ANSI.pm blib/lib/DBI/Const/GetInfo/ANSI.pm
cp lib/DBD/Gofer/Transport/stream.pm blib/lib/DBD/Gofer/Transport/stream.pm
cp lib/DBD/Gofer/Policy/classic.pm blib/lib/DBD/Gofer/Policy/classic.pm
cp lib/DBI/Gofer/Transport/stream.pm blib/lib/DBI/Gofer/Transport/stream.pm
cp lib/DBI/Const/GetInfoReturn.pm blib/lib/DBI/Const/GetInfoReturn.pm
cp DBI.pm blib/lib/DBI.pm
cp lib/DBI/Gofer/Serializer/Storable.pm blib/lib/DBI/Gofer/Serializer/Storable.pm
cp lib/DBD/Gofer/Policy/Base.pm blib/lib/DBD/Gofer/Policy/Base.pm
cp lib/DBD/Sponge.pm blib/lib/DBD/Sponge.pm
cp lib/DBD/Gofer/Policy/pedantic.pm blib/lib/DBD/Gofer/Policy/pedantic.pm
cp lib/DBI/Gofer/Transport/pipeone.pm blib/lib/DBI/Gofer/Transport/pipeone.pm
cp lib/DBI/DBD/SqlEngine/Developers.pod blib/lib/DBI/DBD/SqlEngine/Developers.pod
cp lib/DBI/W32ODBC.pm blib/lib/DBI/W32ODBC.pm
cp lib/DBD/Gofer/Transport/null.pm blib/lib/DBD/Gofer/Transport/null.pm
cp lib/Bundle/DBI.pm blib/lib/Bundle/DBI.pm
cp lib/DBD/File/Developers.pod blib/lib/DBD/File/Developers.pod
cp lib/DBI/Profile.pm blib/lib/DBI/Profile.pm
cp lib/DBI/ProfileDumper.pm blib/lib/DBI/ProfileDumper.pm
cp lib/DBI/Gofer/Serializer/Base.pm blib/lib/DBI/Gofer/Serializer/Base.pm
cp lib/DBI/ProxyServer.pm blib/lib/DBI/ProxyServer.pm
cp dbipport.h blib/arch/auto/DBI/dbipport.h
cp lib/DBI/Gofer/Execute.pm blib/lib/DBI/Gofer/Execute.pm
cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm
cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm
cp lib/DBI/DBD/SqlEngine.pm blib/lib/DBI/DBD/SqlEngine.pm
cp lib/DBI/PurePerl.pm blib/lib/DBI/PurePerl.pm
cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm
cp lib/DBI/ProfileData.pm blib/lib/DBI/ProfileData.pm
/usr/perl5/5.12/bin/perl -p -e "s/~DRIVER~/Perl/g" ./Driver.xst > Perl.xsi
/usr/perl5/5.12/bin/perl /usr/perl5/5.12/lib/ExtUtils/xsubpp -typemap /usr/perl5/5.12/lib/ExtUtils/typemap -typemap typemap Perl.xs > Perl.xsc && mv Perl.xsc Perl.c
gcc -c -DPTR_IS_LONG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -xO4 -DVERSION=\"1.621\" -DXS_VERSION=\"1.621\" -KPIC "-I/usr/perl5/5.12/lib/i86pc-solaris-64int/CORE" -DDBI_NO_THREADS Perl.c
gcc: unrecognized option '-KPIC'
gcc: language O4 not recognized
gcc: language O4 not recognized
gcc: Perl.c: linker input file unused because linking not done
/usr/perl5/5.12/bin/perl /usr/perl5/5.12/lib/ExtUtils/xsubpp -typemap /usr/perl5/5.12/lib/ExtUtils/typemap -typemap typemap DBI.xs > DBI.xsc && mv DBI.xsc DBI.c
gcc -c -DPTR_IS_LONG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -xO4 -DVERSION=\"1.621\" -DXS_VERSION=\"1.621\" -KPIC "-I/usr/perl5/5.12/lib/i86pc-solaris-64int/CORE" -DDBI_NO_THREADS DBI.c
gcc: unrecognized option '-KPIC'
gcc: language O4 not recognized
gcc: language O4 not recognized
gcc: DBI.c: linker input file unused because linking not done
Running Mkbootstrap for DBI ()
chmod 644 DBI.bs
rm -f blib/arch/auto/DBI/DBI.so
cc -G -L/usr/lib -L/usr/ccs/lib -L/lib -L/usr/gnu/lib DBI.o -o blib/arch/auto/DBI/DBI.so \
\
gmake: cc: Command not found
gmake: *** [blib/arch/auto/DBI/DBI.so] Error 127
TIMB/DBI-1.621.tar.gz
/usr/sfw/bin/gmake -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
TIMB/DBI-1.621.tar.gz : make NO
抱歉,我花了很长时间编辑这个并提出错误,一路上有点忙。任何人都有任何想法这个巨大的错误意味着什么?我认为它与编译器有关,只是不确定是什么。
新编辑
所以在我找到解决方法之后,它经历了安装过程(花费了很长时间)并最终推出了这个......
Test Summary Report
-------------------
../cpan/CGI/t/tmpdir.t (Wstat: 0 Tests: 9 Failed: 0)
TODO passed: 3, 6, 8
../cpan/Socket/t/getnameinfo.t (Wstat: 256 Tests: 14 Failed: 1)
Failed test: 10
Non-zero exit status: 1
Files=2334, Tests=522101, 1212 wallclock secs (90.50 usr 58.34 sys + 533.70 cusr 288.26 csys = 970.80 CPU)
Result: FAIL
*** Error code 1
make: Fatal error: Command failed for target `test_harness'
Installed /home/oracle/perl5/perlbrew/build/perl-5.16.0 as perl-5.16.0 successfully. Run the following command to switch to it.
perlbrew switch perl-5.16.0
基于此,我继续前进/home/oracle/perl5/perlbrew/bin/perlbrew switch perl-5.16.0
,但又返回了perl-5.16.0 is not installed
:/
我只是继续尝试寻找perl-5.16.0的实例并做了......
root@dr-solaris11:~/perl5/perlbrew/build# cd /home/oracle/perl5/perlbrew/build/perl-5.16.0
root@dr-solaris11:~/perl5/perlbrew/build/perl-5.16.0# ls
Artistic MANIFEST README.cn
AUTHORS mathoms.c README.cygwin
autodoc.pl mathoms.o README.dgux
av.c META.yml README.dos
av.h metaconfig.h README.epoc
av.o metaconfig.SH README.freebsd
beos mg_data.h README.haiku
bitcount.h mg_names.c README.hpux
cflags mg_raw.h README.hurd
cflags.SH mg_vtable.h README.irix
Changes mg.c README.jp
charclass_invlists.h mg.h README.ko
config_h.SH mg.o README.linux
config.h minimod.pl README.macos
config.over miniperl README.macosx
config.sh miniperlmain.c README.micro
configpm miniperlmain.o README.mpeix
Configure mkppport README.netware
configure.com mkppport.lst README.openbsd
configure.gnu mpeix README.os2
cop.h mro.c README.os390
Copying mro.o README.os400
cpan myconfig README.plan9
Cross myconfig.SH README.qnx
cv.h mydtrace.h README.riscos
cygwin NetWare README.solaris
deb.c nostdio.h README.symbian
deb.o numeric.c README.tru64
dist numeric.o README.tw
djgpp op_reg_common.h README.uts
doio.c op.c README.vmesa
doio.o op.h README.vms
doop.c op.o README.vos
doop.o opcode.h README.win32
dosish.h opmini.c realclean.sh
dquote_static.c opmini.o reentr.c
dump.c opnames.h reentr.h
dump.o os2 reentr.o
DynaLoader.o overload.c regcharclass.h
embed.fnc overload.h regcomp.c
embed.h pad.c regcomp.h
embedvar.h pad.h regcomp.o
epoc pad.o regcomp.sym
ext parser.h regen
ext.libs patchlevel.h regen_perly.pl
EXTERN.h perl regen.pl
extra.pods perl.c regexec.c
fakesdio.h perl.h regexec.o
fakethr.h perl.o regexp.h
feature.h perlapi.c regnodes.h
form.h perlapi.h run.c
generate_uudmap perlapi.o run.o
generate_uudmap.c perldtrace.d runtests
generate_uudmap.o perlio.c runtests.SH
genpacksizetables.pl perlio.h scope.c
git_version.h perlio.o scope.h
globals.c perlio.sym scope.o
globals.o perliol.h sv.c
globvar.sym perlmain.c sv.h
gv.c perlmain.o sv.o
gv.h perlmini.c symbian
gv.o perlmini.o t
h2pl perlsdio.h taint.c
haiku perlsfio.h taint.o
handy.h perlsh TestInit.pm
hints perlvars.h thread.h
hv.c perly.act time64_config.h
hv.h perly.c time64.c
hv.o perly.h time64.h
INSTALL perly.o toke.c
install_lib.pl perly.tab toke.o
installhtml perly.y uconfig.h
installman plan9 uconfig.sh
installperl pod uconfig64.sh
INTERN.h Policy_sh.SH universal.c
intrpvar.h Policy.sh universal.o
iperlsys.h Porting unixish.h
keywords.c pp_ctl.c utf8.c
keywords.h pp_ctl.o utf8.h
keywords.o pp_hot.c utf8.o
l1_char_class_tab.h pp_hot.o utfebcdic.h
lib pp_pack.c util.c
libperl.a pp_pack.o util.h
locale.c pp_proto.h util.o
locale.o pp_sort.c utils
mad pp_sort.o utils.lst
madly.c pp_sys.c uts
make_ext.pl pp_sys.o uudmap.h
make_patchnum.pl pp.c veryclean.sh
makedef.pl pp.h vmesa
makedepend pp.o vms
makedepend.SH proto.h vos
makefile qnx warnings.h
Makefile README win32
Makefile.micro README.aix write_buildcustomize.pl
makefile.old README.amiga x2p
Makefile.SH README.beos XSUB.h
malloc_ctl.h README.bs2000
malloc.c README.ce
然后我尝试了,/home/oracle/perl5/perlbrew/bin/perlbrew switch /home/oracle/perl5/perlbrew/build/perl-5.16.0
我仍然得到:/home/oracle/perl5/perlbrew/build/perl-5.16.0 is not installed
:/
答案 0 :(得分:2)
perlbrew
。 (如果要将perlbrew的文件存储在非默认目录中,请首先设置环境变量PERLBREW_ROOT
。)在安装结束时,它会告诉您将shell命令添加到登录shell配置并登录再次,不要忽视这些步骤。使用perlbrew
安装支持的Perl:
perlbrew -v install perl-5.16.0 -Dcc=gcc
perlbrew switch perl-5.16.0
perlbrew install-cpanm
cpanm
替代cpan
,无需进一步配置。
cpanm -v CGI
cpanm -v DBI
cpanm -v DBD::Oracle
答案 1 :(得分:1)
我不确定您为什么要更改分发的安装位置,但要这样做,请使用
perl Makefile.PL PREFIX=/opt/oracle/rdbms
或其他一些。请勿修改Makefile
。
您可以更改模块的安装位置,但不清楚是否告诉Perl安装模块的位置。对于上面的命令,你需要这样的东西:
export PERL5LIB=/opt/oracle/rdbms/lib/site_perl
如果仍然无法使其正常工作,请提供完整的错误消息 - 它应指定Perl的位置 - 并且安装后该目录的完整修补程序为DBI.pm
。 (使用上述设置,可能会发现类似/opt/oracle/rdbms/lib/site_perl/5.16.0/x86_64-linux-thread-multi/DBI.pm
。)
答案 2 :(得分:1)
回到你的装置:
步骤1-5很好。不要输出PERL5LIB或PERLLIB,不确定它是什么意思。
步骤6)编译DBI
cd DBI-1.621
因为您想使用不同的perl,请执行以下操作:
/opt/oracle/rdbms/perl/bin/perl Makefile.PL
这应该拾取perl的编译器选项和perl库位置(我假设您正在尝试使用oracle安装的perl,不确定这是否明智)。 在DBI-1.621中运行make,然后进行安装。
步骤7)编译DBD:Oracle并再次在Makefile.PL上使用/ opt / oracle / rdbms / perl / bin / perl创建makefile,不要编辑Makefile.PL。如果要进行make测试,请确保已设置ORACLE_HOME和ORACLE_USERID。您可能还必须将LD_LIBRARY_PATH设置为包含$ ORACLE_HOME / lib(如果尚未包含)。像使用DBI一样运行make和install。
步骤8)编译CGI,就像之前在Makefile.PL上使用/ opt / oracle / rdbms / perl / bin / perl一样生成正确的makefile,然后运行make and install。
替代方法是:
do step1-5 export ORACLE_HOME="enter oracle home" export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/lib /opt/oracle/rdbms/perl/bin/perl -MCPAN -e 'shell' cpan>install DBI cpan>install DBD::Oracle cpan>install CGI