Posted on 2005-03-21 13:02:23-08 by vidhya
DBI Module of Perl in Unix
Hi We installed DBI module of Perl on Unix - AIX 5.1. freeware.perl.DBI.rte 1.14.0.0 COMMITTED Perl DataBase Interface freeware.perl.rte 5.6.1.0 COMMITTED PERL scripting language perl.rte 5.6.0.0 COMMITTED Perl Version 5 Runtime After this we did # perl extractor_v1.2.pl Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/5.6.1/aix-thread /usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.6.1/aix-thread /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .) at extractor_v1.2.pl line 27. BEGIN failed--compilation aborted at extractor_v1.2.pl line 27. Does anyone have the clue to solve the above error
Direct Responses: 240 | 243 | Write a response
Posted on 2005-03-21 13:12:05-08 by ivorw in response to 239
Re: DBI Module of Perl in Unix

You say "We installed DBI module of Perl". Please can you give more details.

In particular, did you use the CPAN shell, CPANPLUS, some kind of platform distro (ppm, rpm, apt-get, etc.)

Or did you download DBI from CPAN and follow the README?
perl Makefile.PL
make
make test
make install

Direct Responses: Write a response
Posted on 2005-03-22 10:09:57-08 by vidhya in response to 239
Re: DBI Module of Perl in Unix
Hi I installed perl.dbd.mysql-1.22.15.0 from www.bullfreeware.com after which I was getting the error which I had posted yesterday Should I install Perl only from the CPAN site. I tried it and got the error: Please, install Net::FTP as soon as possible. CPAN.pm installs it for you if you just type install Bundlelibnet Issuing "/usr/bin/ftp -n" ftp: Unknown host ftp.perl.org Not connected. Thanks very much
Direct Responses: 244 | Write a response
Posted on 2005-03-22 10:29:19-08 by ivorw in response to 243
Re: DBI Module of Perl in Unix

The point is that you need to install DBI (which is not included in, but required by DBD::MySQL).

Try http://search.cpan.org/~timb/DBI-1.48/

Regarding where you get your Perl from, it is important that you have access to the same C compiler as the one that Perl was built with. Many pre-built perls were compiled with gcc, which is best for most Unix platforms; I don't know about building Perl on AIX because I've never done it. You might need to download and build gcc, see http://directory.fsf.org/devel/compilers/gcc.html

the command perl -V will tell you how perl was built, and with which compiler and linker options. If you can reproduce this on your system, you can use the pre-supplied Perl. Otherwise I would recommend downloading the perl sources off CPAN and building them yourself. This will give you the option of adding XS extensions (external C code) - which is what both DBI and DBD::MySQL require.

Hope this helps

Direct Responses: 246 | Write a response
Posted on 2005-03-22 12:29:23-08 by vidhya in response to 244
Re: DBI Module of Perl in Unix
Hi Thanks very much for the quick response. I downloaded the module as given by you in the site. When i unzipped and tried to execute # perl Makefile.PL, I am getting the following error: Can't locate Test/Harness/Straps.pm in @INC (@INC contains: lib /usr/opt/perl5/lib/5.6.0/aix /usr/opt/perl5/lib/5.6.0 /usr/opt/perl5/lib/site_perl/5.6.0/aix /usr/opt/perl5/lib/site_perl/5.6.0 /usr/opt/perl5/lib/site_perl .) at /usr/opt/perl5/lib/5.6.0/Test/Harness.pm line 7. BEGIN failed--compilation aborted at /usr/opt/perl5/lib/5.6.0/Test/Harness.pm line 7. Compilation failed in require at Makefile.PL line 38. BEGIN failed--compilation aborted at Makefile.PL line 38. This is what we get when we tried perl -V: Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=aix, osvers=5.0.0.0, archname=aix uname='aix shaq 1 5 006044854c00 ' config_args='-de' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='cc', optimize='-O', gccversion= cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384' ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -q32 -D_LARGE_FILES -qlonglong' stdchar='unsigned char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='ld', ldflags ='-b32' libpth=/lib /usr/lib /usr/ccs/lib libs=-lbind -lnsl -lgdbm -ldbm -ldb -ldl -lld -lm -lC -lC_r -lc -lcrypt -lbsd -lPW -liconv libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -bE:/usr/opt/perl5/lib/5.6.0/aix/CORE/perl.exp' cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lC -lc ' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under aix Compiled at Nov 22 2000 08:49:49 @INC: /usr/opt/perl5/lib/5.6.0/aix /usr/opt/perl5/lib/5.6.0 /usr/opt/perl5/lib/site_perl/5.6.0/aix /usr/opt/perl5/lib/site_perl/5.6.0 /usr/opt/perl5/lib/site_perl Is it enough that we have Perl Runtime alone inorder to install DBI module of Perl Thanks very much for all the inputs/suggestions
Direct Responses: 252 | Write a response
Posted on 2005-03-23 14:23:42-08 by ivorw in response to 246
Re: DBI Module of Perl in Unix

Looks like your Test::Harness is broken. Although this is a core module, it is being actively enhanced and maintained, so I would try getting and installing the latest version off CPAN. But you might be getting more serious problems with other core modules and the 5.6.0 build.

Another possibility is a problem with something in your @INC path - directories, permissions and the like. Can you see a Test/Harness/Straps.pm anywhere there?

perl 5.6.0 is quite old now; it's also quite buggy from what I remember. Release 5.6.1 fixed most of the bugs, and is quite stable. There are further point releases in the 5.6 scheme, but don't contain anything major after 5.6.1.

If you are looking to build a new perl, I recommend going to the latest 5.8.x release, which is 5.8.6 - November 2004.

Direct Responses: 259 | Write a response
Posted on 2005-03-24 14:03:00-08 by vidhya in response to 252
Re: DBI Module of Perl in Unix
Hi Thanks very much for the suggestions There does exist a Straps.pm in the location : /ii/pa/perl-5.6.1/usr/local/lib/perl5/5.6.1/Test. But I do not have a clue what to change in this file. Can you help me on what to modify in this file Yes, we are looking at a new perl but our os level is 5.1 and hence we cannot go for 5.8.6 Thanks
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.