Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am trying to install Perl DBI module on Solaris 11 manually using Make install:

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. Please help to find the resolution.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
317 views
Welcome To Ask or Share your Answers For Others

1 Answer

Per Oracle's Solaris 11 Perl 5 documentation:

Perl 5 includes a dynamically loadable module framework, which allows the addition of new capabilities for specific tasks. Many modules are freely available from the Comprehensive Perl Archive Network (CPAN) at http://www.cpan.org. 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. See the perlgcc(1) man page with the 5.8.4 distribution for details.

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)

Are you really installing user-compiled modules as root into the system's Perl installation? Since you have "7 registered patches", it seems that this is a system under an Oracle support contract. Installing user-compiled modules as root into the system Perl installation risks your system's stability and likely violates your support contract.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...