我正试图在我的RHEL6.1服务器上安装Perl模块DBD::Oracle。在这样做时,我遵循了以下步骤:
- oracle-instantclient12.1-basic-12.1.0.2.0-1.x86\_64.rpm
- oracle-instantclient12.1-devel-12.1.0.2.0-1.x86\_64.rpm
- oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86\_64.rpm
export ORACLE_HOME=/usr/lib/oracle/12.1/client64
export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/libcpan -i DBD::Oracle在这样做的同时,它提供了以下错误消息:
Installing on a linux, Ver#2.6
Using Oracle in /usr/lib/oracle/12.1/client64
DEFINE _SQLPLUS_RELEASE = "1201000200" (CHAR)
Oracle version 12.1.0.2 (12.1)
Unable to locate an oracle.mk or other suitable *.mk
file in your Oracle installation. (I looked in
/usr/lib/oracle/12.1/client64/rdbms/demo/demo_xe.mk /usr/lib/oracle/12.1/client64/rdbms/lib/oracle.mk /usr/lib/oracle/12.1/client64/rdbms/demo/oracle.mk /usr/lib/oracle/12.1/client64/rdbms/demo/demo_rdbms.mk /usr/lib/oracle/12.1/client64/rdbms/demo/demo_rdbms64.mk /usr/lib/oracle/12.1/client64/rdbms/lib/ins_rdbms.mk /usr/share/oracle/12.1/client64/demo.mk under /usr/lib/oracle/12.1/client64)
The oracle.mk (or demo_rdbms.mk) file is part of the Oracle
RDBMS product. You need to build DBD::Oracle on a
system which has one of these Oracle components installed.
(Other *.mk files such as the env_*.mk files will not work.)
Alternatively you can use Oracle Instant Client.
In the unlikely event that a suitable *.mk file is installed
somewhere non-standard you can specify where it is using the -m option:
perl Makefile.PL -m /path/to/your.mk
See the appropriate README file for your OS for more information and some alternatives.
at Makefile.PL line 1187.
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
PYTHIAN/DBD-Oracle-1.74.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install安装过程怎么了?我听从了this的指引。
发布于 2014-10-05 06:37:24
安装和安装Oracle客户端之后,在没有cpan工具的情况下使用正常的构建步骤,并将-l选项传递给Makefile.PL
tar.gz包并解压它发布于 2015-05-06 09:35:24
实际上,如果要使用rpms和cpan安装,就必须将ORACLE_HOME设置为lib文件夹,而不仅仅是client64,并将sqlplus添加到路径中:
export ORACLE_HOME=/usr/lib/oracle/12.1/client64/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/12.1/client64/lib/
export PATH=$PATH:/usr/lib/oracle/12.1/client64/bin这样,cpan -i DBD::Oracle就不会返回错误。
发布于 2016-06-14 16:47:02
CPAN安装程序唯一找不到的就是一个合适的*.mk文件。Oracle必须与CPAN安装程序玩猫和鼠标游戏,因为安装程序在多个位置搜索多个文件名。
我用了命令
locate -r '\.mk$'发现demo.mk现在位于/usr/lib/oracle/12.1/client64/demo/而不是/usr/lib/oracle/12.1/client64/
所以我创建了一个符号链接
sudo ln -s /usr/share/oracle/12.1/client64/demo/demo.mk /usr/share/oracle/12.1/client64/demo.mkCPAN安装程序成功。
https://stackoverflow.com/questions/26200174
复制相似问题