I need help running DBI

N

Nene

I compied perl and DBI on BOX A; I did ./Configure prefix=/blah/blah.
I copied over the perl directories to BOX B (don't worry the prefix
install path mimicks perl on BOX B).

Now I can run perl, I tested with a hello world program, I added use
strict, use warnings. Works w/o issues.

Now when I add 'use DBI', I get an error because I have missing lib
files in BOX B (its not the libmysqlclient libraries are missing).
Below is the error:

install_driver(mysql) failed: Can't load '/c$/perlscripts/
localperl5.10/lib/site_perl/5.10.0/i686-linux-64int/auto/DBD/mysql/
mysql.so' for module DBD::mysql: libssl.so.4: cannot open shared
object file: No such file or directory at /c$/perlscripts/
localperl5.10/lib/5.10.0/i686-linux-64int/DynaLoader.pm line 203.

Its not mysql.so that is causing the problem, its libssl.so.4 that is
missing on BOX B. I can easily copy over that file from another box
(which I did) run it again, and I'll get another missing lib file;
about 5 or 6 of them.

So what is the best course of action to get this resolved. Can I
recompile DBI on BOX A and tell it to point all the neccessary lib
files to a directory in the Perl directory?

When I did a ldd on mysql.so, I got:

ldd /auto/DBD/mysql/mysql.so
linux-gate.so.1 => (0xffffe000)
libmysqlclient.so.15 => /usr/lib/mysql/libmysqlclient.so.15
(0xf7ddd000)
libz.so.1 => /lib32/libz.so.1 (0xf7dc8000)
libcrypt.so.1 => /lib32/libcrypt.so.1 (0xf7d9a000)
libnsl.so.1 => /lib32/libnsl.so.1 (0xf7d85000)
libm.so.6 => /lib32/tls/libm.so.6 (0xf7d62000)
libssl.so.4 => /lib/libssl.so.4 (0xf7d2e000)
libcrypto.so.4 => /lib/libcrypto.so.4 (0xf7c44000)
libc.so.6 => /lib32/tls/libc.so.6 (0xf7b2a000)
/lib/ld-linux.so.2 (0x56555000)
libgssapi_krb5.so.2 => not found
libkrb5.so.3 => not found
libcom_err.so.2 => /lib32/libcom_err.so.2 (0xf7b28000)
libk5crypto.so.3 => not found
libresolv.so.2 => /lib32/libresolv.so.2 (0xf7b13000)
libdl.so.2 => /lib32/libdl.so.2 (0xf7b0f000)
libgssapi_krb5.so.2 => not found
libkrb5.so.3 => not found
libk5crypto.so.3 => not found

Does this mean I have to copy all these files over from BOX A to BOX B
to work. Is there an easier way, thanks in advance.

nene
 
B

Ben Morrow

Quoth Nene said:
I compied perl and DBI on BOX A; I did ./Configure prefix=/blah/blah.
I copied over the perl directories to BOX B (don't worry the prefix
install path mimicks perl on BOX B).

Now I can run perl, I tested with a hello world program, I added use
strict, use warnings. Works w/o issues.

Now when I add 'use DBI', I get an error because I have missing lib
files in BOX B (its not the libmysqlclient libraries are missing).
Below is the error:

install_driver(mysql) failed: Can't load '/c$/perlscripts/
localperl5.10/lib/site_perl/5.10.0/i686-linux-64int/auto/DBD/mysql/
mysql.so' for module DBD::mysql: libssl.so.4: cannot open shared
object file: No such file or directory at /c$/perlscripts/
localperl5.10/lib/5.10.0/i686-linux-64int/DynaLoader.pm line 203.

Its not mysql.so that is causing the problem, its libssl.so.4 that is
missing on BOX B. I can easily copy over that file from another box
(which I did) run it again, and I'll get another missing lib file;
about 5 or 6 of them.

So what is the best course of action to get this resolved. Can I
recompile DBI on BOX A and tell it to point all the neccessary lib
files to a directory in the Perl directory?

No, sorry.
When I did a ldd on mysql.so, I got:

ldd /auto/DBD/mysql/mysql.so <snip»

Does this mean I have to copy all these files over from BOX A to BOX B
to work.

Yes. Don't attempt to copy any that are already present on box B, and
note that linux-gate.so doesn't actually exist (it's an artefact of the
Linux dynamic loader) so you can't copy that one either.
Is there an easier way, thanks in advance.

Easier would be to install perl, DBI and DBD::mysql on box B through
your OS's package system.

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top