1

While running ./checksetup.pl I get this error where the installation stops.

Reading ./localconfig... Checking for DBD-mysql (v4.00) ok: found v4.018 Checking for MySQL (v4.1.2) ok: found v5.5.11 /usr/bin/perl: symbol lookup error: lib/i386-linux-thread-multi/auto/DBD/mysql/mysql.so: undefined symbol: is_prefix 

Bugzilla 4.0.1 / CentOS 5.5

perl -v This is perl, v5.8.8 built for i386-linux-thread-multi mysql Server version: 5.5.11 MySQL Community Server (GPL) by Remi 

What's to be done?

Thanks, Andi


Trying to run cpan> install DBD::mysql gives:

 /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00base.t .................. 1/6 Bailout called. Further testing stopped: Unable to load DBD::mysql # Failed test 'use DBD::mysql;' # at t/00base.t line 21. # Tried to use 'DBD::mysql'. # Error: Can't load '/root/.cpan/build/DBD-mysql-4.018/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: /root/.cpan/build/DBD-mysql-4.018/blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: is_prefix at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230. # at (eval 7) line 2 # Compilation failed in require at (eval 7) line 2. # BEGIN failed--compilation aborted at (eval 7) line 2. FAILED--Further testing stopped: Unable to load DBD::mysql make: *** [test_dynamic] Error 255 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force 

As for perl -e 'use DBD::mysql;' this gives nothing to console, just back to prompt.

3 Answers 3

1

Something went wrong with the installation of your DBD driver, obviously.

You should probably install the Perl module from the CentOS repositories directly:

yum install perl-DBD-MySQL 

But if you have a specific reason to use the CPAN client to install the module, it needs a build environment (i.e. a C compiler) and also the MySQL C header files on the system. Usually, you would do this by installing two additional packages:

yum install mysql-devel libz-devel 

Now you can properly compile the DBD driver.

1
  • 1
    Fixed. Your post helped me to notice that I had mysql-devel 5.0.77 while the rest mysql, mysql-server were 5.5.12. zlib-devel was up to date. I updated mysql-devel and then tried to install again.. still same issue. I have deleted lib/i386-linux-thread-multi folder and then run the installer again and fixed modules and all dependencies. Commented May 12, 2011 at 11:56
1

It looks to me like the perl shared-object isn't properly linked against the libmysql library, which is most likely due to version differences.

You probably need to reinstall, possibly by hand, the DBD::mysql module.

One more diagnostic step first, as this should fail as well:

# perl -e 'use DBD::mysql;' 

That should give you the same error, most likely, but if may give you more useful information.

If you need to install the DBD::mysql module by hand, use this:

# perl -MCPAN -e shell cpan> install DBD::mysql 
0
0

If still fails there is another option, to install from repo using yum install perl-DBD-MySQL. (use yum search dbd to get the exact name). This is faster than installing from cpan because the dependencies are installed automatically for you and not compiled from sources.

HTH

1
  • That's the way I installed the module. But this gives me the first error from the top. Commented May 12, 2011 at 7:47

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.