Sorry to say, but you are into a mini-project to get things working again.  
From past experience, IBM tends to make a minimalistic version of Perl 
available to you by default with AIX.  So your original error messages were 
telling you that the modules your program requires are not part of the IBM's 
standard Perl package.  Also the AIX perl packages tends to be fairly old.

First of all, I strongly recommend that you don't copy any more files from 
under the Perl 5.8.8 tree into your Perl 5.10.1 tree.  You copy the wrong one 
and you may start getting really strange errors that no one will be able to 
help you resolve.  So if you still have a list of those modules you did this 
for, I'd recommend removing what you manually copied over and reinstalling them 
the correct way.  (It may be too late already & you may have to completely 
remove it & reinstall Perl to fix things.  Sometimes multiple modules are 
installed in the same directory.  But let's assume for now that things are 
still OK after you remove things.  That you didn't overwrite anything 
important.)

Second there may be a short cut you can take.  If your previous version of Perl 
is still installed after your upgrade, you can downgrade back down to Perl 
5.8.8 by updating a some symbolic links.  If the original Perl was removed as 
part of your upgrade, you're out of luck there.  The only reason I mention this 
option is you said you copied files between releases.  And if it was from the 
same machine, this is doable.  But this requires a Unix Admin to update about 
31 different Symbolic links in the /usr/bin directory.  If IBM provided a 
script to do this, I don't know what it is.

Now onto fixing Perl 5.10.1.

You can tell what version a module is at by running the following command:
perl -we 'use modulename 999;'

It will tell you either the module is not installed, or it will tell you what 
version the module is currently at.  So for example:
    perl -we 'use Net::FTP 999;'
   Net::FTP version 999 required--this is only version 2.75 at -e line 1.
   BEGIN failed--compilation aborted at -e line 1.

NOTE:  To install some Perl modules, like DBI, you will need IBM's C/C++ 
compiler, which costs $$$.  If you end up having to go with the free GCC 
compiler be warned that you may have to recompile Perl itself and start from 
scratch.  Using different C compilers for compiling Perl & it's modules is 
known to cause issues.  So the instructions below assume you have IBM's C/C++ 
compiler already available.

Install Perl Modules:

1)      Download the missing modules & their dependencies from CPAN. 
http://search.cpan.org/  This link will allow you to search for the modules you 
need to download.

2)      Extract the compressed tar file into a work directory.

3)      Read the README file, it will tell you if there is anything special 
required for building the module.  But in general it's the following 4 steps:

a)      perl Makefile.PL

b)      make

c)       make test

d)      make install

A couple of things to watch out for that can cause you headaches.

1)      You must do steps 3c & 3d as root.  (or whatever user Perl was 
installed under)  It's OK to do all steps as root if you wish.

2)      When you 1st login as root, check your umask settings.  If it doesn't 
say 022, run "umask 022".  A common problem is someone forgets to do this and 
after the successful install, no other user can use the module.

3)      Do not ignore any errors reported by step 3c, it's OK for it to skip 
tests, but NOT OK if it says it has problems.

4)      For step 3a, read any messages about dependencies carefully.  Some of 
the modules it lists are optional, while others are really required.  Sometimes 
a module is already installed, but it's at an incompatible version & needs to 
be upgraded before you can install the one you are working on.  If you're not 
careful here, you could end up installing way more modules than you really need 
to.

As a final note, if you are doing this for multiple machines, you can take a 
short cut on the next AIX box by taring up all your work directory and copying 
it between machines.  So on the other AIX boxes all you would have to do is 
steps 3c & 3d.  This helps greatly if a C/C++ compiler is needed.  Since then 
you'll only need the compiler on your development box.  But be careful that all 
dependency software was installed in the same location on all servers and 
install the perl modules in the same order you did for the original AIX box.  
So keep good notes!

Good luck :)

Curtis

From: Jillapelli, Ramakrishna [mailto:ramakrishna.jillape...@xerox.com]
Sent: Friday, March 07, 2014 6:49 AM
To: dbi-users@perl.org
Subject: Reg: perl DBI errors

Hi,

Recently AIX 6.x is upgraded to AIX 7.1 on our servers.
That upgraded automatically Perl version to 5.10.1.

There are lot of perl and shell scripts on our servers.
After upgrading most of the perl scripts failing.

Errors:

1)      Can't locate loadable object for module DBI in @INC (@INC contains: 
/usr/opt/perl5/lib/5.10.1/aix-thread-multi /usr/opt/perl5/lib/5.10.1

2)
/usr/opt/perl5/lib/site_perl/5.10.1/aix-thread-multi 
/usr/opt/perl5/lib/site_perl/5.10.1 .) at 
/usr/opt/perl5/lib/5.10.1/aix-thread-multi/DBI.pm line 265
BEGIN failed--compilation aborted at 
/usr/opt/perl5/lib/5.10.1/aix-thread-multi/DBI.pm line 265.
Compilation failed in require at /tivoli/MWV/scripts/EventsByClass.pl line 31.
BEGIN failed--compilation aborted at /tivoli/MWV/scripts/EventsByClass.pl line 
31.


3)       Can't locate Date/Pcalc.pm in @INC (@INC contains: 
/usr/opt/perl5/lib/5.10.1/aix-thread-multi /usr/opt/perl5/lib/5.10.1

4)
/usr/opt/perl5/lib/site_perl/5.10.1/aix-thread-multi 
/usr/opt/perl5/lib/site_perl/5.10.1 .) at netview_update.pl line 18.
BEGIN failed--compilation aborted at netview_update.pl line 18.

Error 2, I fixed by copying the "Date" dir  from old perl version 5.8.8
cp -R /usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi/Date 
/usr/opt/perl5/lib/5.10.1/aix-thread-multi/

Similarly I copied DBI, DBD dirs. For fixing error 1, not worked.

Why we are not getting *.pm files automatically.
Do we need to separately install all required libraries (functions)?

Our perl scripts using the following functions:
Date::Pcalc qw(:all)
Net::FTP
File::Copy
DBI::
LWP::UserAgent
HTTP::Request::Common qw(POST)
Net::Ping
Getopt::Std
Time::Local

I am not sure what all we missed *.pm files in the latest perl 5.10.1.

Please guide me how to install *.pm files (DBI, Date,...) in latest version.

Thanks & Regards,

Ramakrishna Jillapelli,
Global Services, Operations and Engineering,

XEROX Business Services,
9th Floor, Explorer Block, White Field Road, ITPL,
Bangalore - 560066, India.

E-Mail: 
ramakrishna.jillape...@xerox.com<mailto:ramakrishna.jillape...@xerox.com>,
Ph: +1-214-530-2222, Ext 3208, Mob: +91-9008177255 (Off), +91-9880678154 (Per).

Reply via email to