简体   繁体   English

在 Solaris 11 中安装 DBI Perl 模块时出现问题

[英]Issue while installing DBI Perl module in Solaris 11

I am trying to install Perl DBI module on Solaris 11 manually using Make install:我正在尝试使用 Make install 在 Solaris 11 上手动安装 Perl DBI 模块:

You can verify the steps mentioned below.您可以验证下面提到的步骤。

/usr/perl5/5.12/ModulesTars/DBI-1.643# make test
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' 
-- DBI.bs blib/arch/auto/DBI/DBI.bs 644
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-Iblib/lib" "-Iblib/arch" test.pl
test.pl
DBI test application $Revision$
Can't load '/usr/perl5/5.12/ModulesTars/DBI-1.643/blib/arch/auto/DBI/DBI.so' 
for module DBI: ld.so.1: perl:
fatal: /usr/perl5/5.12/ModulesTars/DBI-1.643/blib/arch/auto/DBI/DBI.so: 
wrong ELF class: ELFCLASS64 at
/usr/perl5/5.12/lib/sun4-solaris-64int/DynaLoader.pm line 200.

at /usr/perl5/5.12/ModulesTars/DBI-1.643/blib/lib/DBI.pm line 284
BEGIN failed--compilation aborted at 
/usr/perl5/5.12/ModulesTars/DBI-1.643/blib/lib/DBI.pm line 284.
Compilation failed in require at test.pl line 23.
BEGIN failed--compilation aborted at test.pl line 23.
*** Error code 2
make: Fatal error: Command failed for target `test_dynamic'
/usr/perl5/5.12/ModulesTars/DBI-1.643#

Getting above error while running make test command.运行 make test 命令时出现上述错误。 Please help to find the resolution.请帮助找到解决方案。

Per Oracle's Solaris 11 Perl 5 documentation :根据 Oracle 的Solaris 11 Perl 5 文档

Perl 5 includes a dynamically loadable module framework, which allows the addition of new capabilities for specific tasks. Perl 5 包括一个可动态加载的模块框架,允许为特定任务添加新功能。 Many modules are freely available from the Comprehensive Perl Archive Network (CPAN) at http://www.cpan.org .许多模块可从http://www.cpan.org的综合 Perl 存档网络 (CPAN) 免费获得。 If you wish to build and install add-on modules from CPAN using gcc, you can do so using the /usr/perl5/5.8.4/bin/perlgcc or the /usr/perl5/5.12/bin/perlgcc script.如果您希望使用 gcc 从 CPAN 构建和安装附加模块,您可以使用/usr/perl5/5.8.4/bin/perlgcc/usr/perl5/5.12/bin/perlgcc脚本来实现。 See the perlgcc(1) man page with the 5.8.4 distribution for details.有关详细信息,请参见 5.8.4 发行版的perlgcc(1)手册页。

Offtopic:无关:

Given your comment鉴于您的评论

This is perl 5, version 12, subversion 5 (v5.12.5) built for sun4-solaris-64int (with 7 registered patches, see perl -V for more detail)这是为 sun4-solaris-64int 构建的 perl 5,版本 12,subversion 5 (v5.12.5)(有 7 个注册补丁,请参阅 perl -V 了解更多详细信息)

Are you really installing user-compiled modules as root into the system's Perl installation?您是否真的以 root 身份将用户编译的模块安装到系统的 Perl 安装中? Since you have "7 registered patches", it seems that this is a system under an Oracle support contract.由于您有“7 个注册补丁”,看来这是一个 Oracle 支持合同下的系统。 Installing user-compiled modules as root into the system Perl installation risks your system's stability and likely violates your support contract.以 root 身份将用户编译的模块安装到系统 Perl 安装会危及您系统的稳定性,并可能违反您的支持合同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM