blackjudas has asked for the wisdom of the Perl Monks concerning the following question:

I've just run into a snag that I can't seem to fix on my own, since I don't really understand where my problem lies. So I have come to seek wisdom. A script that I've written was to go to a production server that has an old install in it (Linux Kernel 2.0.36, MySQL 3.22, Perl 5.004_04) it currently runs many scripts that work with flat files, and now we're moving to SQL driven web-apps, fine with me but as the server is a prime-time server, I can't take it down for upgrades. The problem came up when I was putting the script on the machine, I went to run it and I got the following error message:

Software error:

Can't load '/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/mysql.s +o' for module DBD::mysql: Unable to resolve symbol at /usr/lib/perl5/ +i386-linux/5.00404/DynaLoader.pm line 166. at (eval 27) line 2
I went to investigate, I re-compiled the Msql-Mysql-modules distro to re-install, but even when I first run perl Makefile.PL I see the following as the first 3 lines, before the question of which driver(s) I want to make:
perl: can't resolve symbol 'open64' perl: can't resolve symbol '__lxstat64' perl: can't resolve symbol 'fopen64' Which drivers do you want to install?
The rest goes smoothly and moves on, once I run make test it passed only about 1% of the tests, now, obviously the make isn't making mysql.so. Petruchio pointed me to the mysql documentation which says that if you get the above messages, change a certain line in the Install.pm module from $sysliblist .= " -lm"; to $sysliblist .= " -lm -lz"; well I went in and the line read $sysliblist .= " -lm -lz -lgz", confused, I changed it to what the documentation states verbatim. The result was the same. I've run out of options, could anyone give me any suggestions? What can I do with this? Could I transfer someone else's set-up to this server just to have mysql access, the script doesn't need to access a server on the localhost, it needs to access a completely different DB server 5,000 miles away. Any help in this matter will receive my utmost appreciation.
BlackJudas

Replies are listed 'Best First'.
Re: Problems with DBD::mysql
by DrManhattan (Chaplain) on Oct 18, 2001 at 07:09 UTC

    The first error probably means your libmysqlclient is off someplace where the linker can't find it. Here are some workarounds:

    <list>
  • Find the directory containing libmysqlclient.a and add it to your LD_LIBRARY_PATH env variable
  • Add said directory to /etc/ld.so.conf and run ldconfig
  • Recompile the module and statically link it
  • <list>

    As to why the module won't recompile, I'm not sure. Are you using the latest DBD::mysql release? The newer distributions are named DBD-mysql-x.xxxx.tar.gz rather than Msql-Mysql-modules-x.xxxx.tar.gz.

    -Matt