Link to home
Start Free TrialLog in
Avatar of krishna ch
krishna ch

asked on

perl DBI.pm issue Aix upgrade to 7.1

Hi All,

We have recently upgraded our Aix OS from 6.1 to 7.1, along with the Os the perl fileset got upgraded to 5.10.1 from 5.8.8, now we are getting the below issue.

Can't locate DBI.pm in @INC (@INC contains: /usr/opt/perl5/lib/5.10.1/aix-thread-multi /usr/opt/perl5/lib/5.10.1 /usr/opt/perl5/lib/site_perl/5.10.1/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.10.1 /usr/opt/perl5/lib/site_perl/5.8.8 /usr/opt/perl5/lib/site_perl .) at /dispatch.pl line 3.
BEGIN failed--compilation aborted at /dispatch.pl line 3.

Can someone please help me to resolve the issue.

I'm thinking to reinstall the older version of perl i.e., 5.8.8, but I'm not sure if it works or not. And I couldn't even find if the 5.8.8 is still compatible with the Aix 7.1 TL 4 SP4. Thanks.

Regards,
Krishna
Avatar of FishMonger
FishMonger
Flag of United States of America image

Down grading perl is not the proper solution.  Modules compiled under 5.8.x are not binary compatible with 5.10.x.  You need to reinstall DBI under 5.10.
On a related note, the normal recommendation is to not touch the system perl at all and instead use perlbrew or envpl to install 1 or more versions of perl in another location.
If I recall how AIX manages packages (poorly), during most upgrades, old packages are left hanging around.

You may prefer to first, completely remove perl-5.8.x + then start your module upgrade process.

And... geez... 5.10.x is very old...

Both my iMac on my desk + Ubuntu servers all are running 5.24.x which is a very recent, stable version.

Might be worthwhile to build perl from scratch, so you start with a recent version.

Once you have the correct perl you're targeting appearing first in your PATH (perl --version), then install latest DBI via...

cpanp i DBI

Open in new window

Avatar of krishna ch
krishna ch

ASKER

Thanks for the reply !!

Currently I'm having the below version of perl and its extensions installed on Aix 7.1 server.

-bash-4.2# lslpp -l | grep -i perl
  perl.libext               2.3.0.15  COMMITTED  Perl Library Extensions
  perl.rte                5.10.1.250  COMMITTED  Perl Version 5 Runtime

I was told that we can install the modules using cpan. Also we actually need to compile it before you can install or if there's a precompiled we can use it.

can you please help me with the url to download perl and steps for compiling and installing it.
You can download perl pre compiled binaries or source code to build it yourself from perl.org
Hi FishMonger,

I couldn't get the compiled binaries form the perl.org link directly.  

I am using steps of running perl Makefile.PL, make, make test, make install to compile.

I downloaded the DBI package from the cpan site and I am able to successfully run perl Makefile.PL from the dbi.pm directory, but when I run the "make" command, I got following error.

Skip blib/lib/DBI/ProfileData.pm (unchanged)
        xlc_r -q32 -c    -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -qlanglvl=extended -I/usr/local/include -q32 -D_LARGE_FILES -qlonglong -O    -DVERSION=\"1.636\"  -DXS_VERSION=\"1.636\"  "-I/usr/opt/perl5/lib/5.10.1/aix-thread-multi/CORE"   Perl.c
/bin/sh: xlc_r:  not found

make: The error code from the last command is 127.

I asked IBM for help, but they say I don't have c compilers. Before migration everything was fine, but after it everything started failing. I even tried the cpan but getting the below errors.

cpan[3]> install DBI
CPAN: Storable loaded ok (v2.20)
CPAN: LWP::UserAgent loaded ok (v2.003)
CPAN: Time::HiRes loaded ok (v1.9719)
Fetching with LWP:
  http://cpan.metacpan.org/authors/01mailrc.txt.gz
Use of uninitialized value $scheme in hash element at /usr/opt/perl5/lib/site_perl/5.10.1/LWP/Protocol.pm line 111, <FIN> line 3.
Use of uninitialized value $scheme in pattern match (m//) at /usr/opt/perl5/lib/site_perl/5.10.1/LWP/Protocol.pm line 114, <FIN> line 3.
Use of uninitialized value $scheme in concatenation (.) or string at /usr/opt/perl5/lib/site_perl/5.10.1/LWP/Protocol.pm line 87, <FIN> line 3.
LWP failed with code[501] message[Protocol scheme '' is not supported]
Warning: no success downloading '/.cpan/sources/authors/01mailrc.txt.gz.tmp9109752'. Giving up on it. at /usr/opt/perl5/lib/5.10.1/CPAN/Index.pm line 225
Warning: no success downloading '/.cpan/sources/authors/01mailrc.txt.gz.tmp9109752'. Giving up on it. at /usr/opt/perl5/lib/5.10.1/CPAN/Index.pm line 225
No external ftp command available

Client not fully configured, please proceed with configuring.

You have not configured a urllist and do not allow connections to the
internet to get a list of mirrors.  If you wish to get a list of CPAN
mirrors to pick from, use this command

    o conf init connect_to_internet_ok urllist

If you do not wish to get a list of mirrors and would prefer to set
your urllist manually, use just this command instead

    o conf init urllist

Fetching with LWP:
  http://cpan.metacpan.org/authors/01mailrc.txt.gz
Use of uninitialized value $scheme in hash element at /usr/opt/perl5/lib/site_perl/5.10.1/LWP/Protocol.pm line 111, <FIN> line 3.
Use of uninitialized value $scheme in pattern match (m//) at /usr/opt/perl5/lib/site_perl/5.10.1/LWP/Protocol.pm line 114, <FIN> line 3.
Use of uninitialized value $scheme in concatenation (.) or string at /usr/opt/perl5/lib/site_perl/5.10.1/LWP/Protocol.pm line 87, <FIN> line 3.
LWP failed with code[501] message[Protocol scheme '' is not supported]
Warning: no success downloading '/.cpan/sources/authors/01mailrc.txt.gz.tmp9109752'. Giving up on it. at /usr/opt/perl5/lib/5.10.1/CPAN/Index.pm line 225
Warning: no success downloading '/.cpan/sources/authors/01mailrc.txt.gz.tmp9109752'. Giving up on it. at /usr/opt/perl5/lib/5.10.1/CPAN/Index.pm line 225
No external ftp command available

I'm now out of any ideas how to deal with this. Can someone please take a look and help me.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.