RH9 mySQL DBD Installation Failure | Perhaps a module hasn"t been fully installed?

RH9 mySQL DBD Installation Failure | Perhaps a module hasn"t been fully installed?

am 04.12.2003 01:01:00 von Matt Wiltfong

Redhat9
I set up a PostgreSQL server, DBI, and DBD::Pg and it all worked fine.
I then used the rpm installer to install:
MySQL-bench-4.0.16-0.i386.rpm
MySQL-client-4.0.16-0.i386.rpm
MySQL-devel-4.0.16-0.i386.rpm
MySQL-server-4.0.16-0.i386.rpm
MySQL-shared-4.0.16-0.i386.rpm
(not in that order)

I tested the MySQL database and have had no trouble using the command =
line
tools to talk to it, set up a database, set up the correct passwords, =
and
even interface with it through myodbc & MS Access on a Windows machine.
MySQL is running fine.

I use CPAN to install DBD::mysql and have endless problems, errors, and
more. I ended up sorting through the archives here and found the little
things I'd overlooked, until I've gotten it to the point that everything
seemed fine. Unfortunately, that's when I went to get some help and the
person I asked for help recommended I try 'apt-get' to fix the problem. =
It
ended up ruining my install of MySQL and I had to reinstall all of the =
above
RPMs from scratch.

I decided to try a manual installation of DBD::mysql, so I downloaded:
DBD-mysql-2.9003.tar.gz

The results are as follows:
------------------------------------------
[root@wiltfong]# perl Makefile.PL --testdb=3Dalumni --testuser=3Droot
--testpassword=3Dfaked=20
I will use the following settings for compiling and testing:

cflags (mysql_config) =3D -I/usr/include/mysql -mcpu=3Di486
-fno-strength-reduce
libs (mysql_config) =3D -L/usr/lib/mysql -lmysqlclient -lz =
-lcrypt
-lnsl -lm -lc -lnss_files -lnss_dns -lresolv -lc -lnss_files -lnss_dns
-lresolv
nocatchstderr (default ) =3D 0
nofoundrows (default ) =3D 0
ssl (guessed ) =3D 0
testdb (Users choice) =3D alumni
testhost (default ) =
testpassword (Users choice) =3D faked
testuser (Users choice) =3D root

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Checking if your kit is complete...
Looks good
Using DBI 1.39 installed in
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBI
Writing Makefile for DBD::mysql

[root@wiltfong DBD-mysql-2.9003]# make
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Mysql.pm blib/lib/Mysql.pm
cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cc -c -I/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBI
-I/usr/include/mysql -mcpu=3Di486 -fno-strength-reduce =
-fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -O3 =
-DVERSION=3D\"2.9003\"
-DXS_VERSION=3D\"2.9003\" -fpic =
"-I/usr/local/lib/perl5/5.8.0/i686-linux/CORE"
dbdimp.c
/usr/local/bin/perl -p -e "s/~DRIVER~/mysql/g"
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBI/Dri ver.xst >
mysql.xsi
/usr/local/bin/perl /usr/local/lib/perl5/5.8.0/ExtUtils/xsubpp -typemap
/usr/local/lib/perl5/5.8.0/ExtUtils/typemap mysql.xs > mysql.xsc && mv
mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line =
192
Warning: duplicate function definition 'rows' detected in mysql.xs, line =
290
cc -c -I/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBI
-I/usr/include/mysql -mcpu=3Di486 -fno-strength-reduce =
-fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -O3 =
-DVERSION=3D\"2.9003\"
-DXS_VERSION=3D\"2.9003\" -fpic =
"-I/usr/local/lib/perl5/5.8.0/i686-linux/CORE"
mysql.c
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH=3D"/usr/lib/mysql:/usr/lib:/lib" /usr/local/bin/perl myld cc
-shared -L/usr/local/lib dbdimp.o mysql.o -o
blib/arch/auto/DBD/mysql/mysql.so -L/usr/lib/mysql -lmysqlclient -lz
-lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv -lc -lnss_files
-lnss_dns -lresolv =20
chmod 755 blib/arch/auto/DBD/mysql/mysql.so
cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
Manifying blib/man3/DBD::mysql.3
Manifying blib/man3/Mysql.3
Manifying blib/man3/DBD::mysql::INSTALL.3
Manifying blib/man3/Bundle::DBD::mysql.3

[root@wiltfong]# make test
PERL_DL_NONLAZY=3D1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base...........ok

t/10dsnlist........ok

t/20createdrop.....ok

t/30insertfetch....ok

t/40bindparam......ok

t/40blobs..........ok

t/40listfields.....ok

t/40nulls..........ok

t/40numrows........ok

t/50chopblanks.....ok

t/50commit.........ok

t/60leaks..........skipped
all skipped: $ENV{SLOW_TESTS} is not set or Proc::ProcessTable =
not
installed=20
t/ak-dbd...........ok

t/akmisc...........ok

t/dbdadmin.........ok

t/insertid.........ok

t/mysql............ok

t/mysql2...........ok

All tests successful, 1 test skipped.
Files=3D18, Tests=3D761, 25 wallclock secs ( 3.08 cusr + 0.38 csys =3D =
3.46 CPU)

[root@wiltfong]# make install
Installing
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBD/mys ql/mysql.so
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Installing /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/Mysql.pm
Installing /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBD/mysql.pm
Installing
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBD/mysql/IN STALL.pod
Installing /usr/local/man/man3/DBD::mysql.3
Installing /usr/local/man/man3/Mysql.3
Installing /usr/local/man/man3/DBD::mysql::INSTALL.3
Installing /usr/local/man/man3/Bundle::DBD::mysql.3
Writing
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBD/mys ql/.packlist
Appending installation info to
/usr/local/lib/perl5/5.8.0/i686-linux/perllocal.pod

[root@wiltfong]# cd /usr/share/sql-bench/

[root@wiltfong]# ./run-all-tests=20
install_driver(mysql) failed: Can't locate loadable object for module
DBD::mysql in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
(eval 51) line 3
Compilation failed in require at (eval 51) line 3.
Perhaps a module that DBD::mysql requires hasn't been fully installed
at /usr/share/sql-bench/server-cfg line 240


----------------------------

The same error occurs with any perl script that I run, even something as
simple as:

#!/usr/bin/perl -w
use DBI;
$database =3D "alumni";
$data_source =3D "DBI:mysql:$database";
$username =3D "";
$password =3D "";
$dbh =3D DBI->connect( $data_source, $username, $password) or die "Can't
connect to $data_source: $dbh->errstr\n";
$dbh->disconnect;
exit(0);


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: RH9 mySQL DBD Installation Failure | Perhaps a module hasn"t been fully installed?

am 04.12.2003 20:33:15 von Rudy Lippan

On Wed, 3 Dec 2003, Matt Wiltfong wrote:

> [root@wiltfong]# make install
> Installing
> /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBD/mys ql/mysql.so
> Files found in blib/arch: installing files in blib/lib into architecture
> dependent library tree
> Installing /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/Mysql.pm
> Installing /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBD/mysql.pm
> Installing
> /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBD/mysql/IN STALL.pod
> Installing /usr/local/man/man3/DBD::mysql.3
> Installing /usr/local/man/man3/Mysql.3
> Installing /usr/local/man/man3/DBD::mysql::INSTALL.3
> Installing /usr/local/man/man3/Bundle::DBD::mysql.3
> Writing
> /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBD/mys ql/.packlist
> Appending installation info to
> /usr/local/lib/perl5/5.8.0/i686-linux/perllocal.pod
>
> [root@wiltfong]# cd /usr/share/sql-bench/
>
> [root@wiltfong]# ./run-all-tests
> install_driver(mysql) failed: Can't locate loadable object for module
> DBD::mysql in @INC (@INC contains:
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
> (eval 51) line 3
> Compilation failed in require at (eval 51) line 3.
> Perhaps a module that DBD::mysql requires hasn't been fully installed
> at /usr/share/sql-bench/server-cfg line 240
>

It looks like you are running 2 different perls. One in
/usr/local/bin/perl and one in /usr/bin/perl. Notice that you installed
DBD::mysql into /usr/local/lib/perl5/site_perl, but when you try and run
it, @inc does not contain any directories in /usr/local/lib, only
/usr/lib/. And if you look back through the output form the make you will
see a /usr/local/bin/perl, and you are running your sample script from
/usr/bin/perl.



HTH,

Rudy



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: RH9 mySQL DBD Installation Failure | Perhaps a module hasn"t been fully installed?

am 04.12.2003 20:33:15 von Rudy Lippan

On Wed, 3 Dec 2003, Matt Wiltfong wrote:

> [root@wiltfong]# make install
> Installing
> /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBD/mys ql/mysql.so
> Files found in blib/arch: installing files in blib/lib into architecture
> dependent library tree
> Installing /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/Mysql.pm
> Installing /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBD/mysql.pm
> Installing
> /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBD/mysql/IN STALL.pod
> Installing /usr/local/man/man3/DBD::mysql.3
> Installing /usr/local/man/man3/Mysql.3
> Installing /usr/local/man/man3/DBD::mysql::INSTALL.3
> Installing /usr/local/man/man3/Bundle::DBD::mysql.3
> Writing
> /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBD/mys ql/.packlist
> Appending installation info to
> /usr/local/lib/perl5/5.8.0/i686-linux/perllocal.pod
>
> [root@wiltfong]# cd /usr/share/sql-bench/
>
> [root@wiltfong]# ./run-all-tests
> install_driver(mysql) failed: Can't locate loadable object for module
> DBD::mysql in @INC (@INC contains:
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
> (eval 51) line 3
> Compilation failed in require at (eval 51) line 3.
> Perhaps a module that DBD::mysql requires hasn't been fully installed
> at /usr/share/sql-bench/server-cfg line 240
>

It looks like you are running 2 different perls. One in
/usr/local/bin/perl and one in /usr/bin/perl. Notice that you installed
DBD::mysql into /usr/local/lib/perl5/site_perl, but when you try and run
it, @inc does not contain any directories in /usr/local/lib, only
/usr/lib/. And if you look back through the output form the make you will
see a /usr/local/bin/perl, and you are running your sample script from
/usr/bin/perl.



HTH,

Rudy



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org