in reply to Bugzilla install error: undefined symbol: mysql_init

symbol lookup error undefined symbol: mysql_init
http://dev.mysql.com/doc/refman/5.0/en/perl-support-problems.html
  • Comment on Re: Bugzilla install error: undefined symbol: mysql_init

Replies are listed 'Best First'.
Re^2: Bugzilla install error: undefined symbol: mysql_init
by jbiz (Initiate) on Sep 17, 2008 at 06:13 UTC
    thanks. I tried each step on the mysql page... no luck.

    When I install DBD using YUM as:

    yum install perl-DBD-MySQL.x86_64

    it installs without issue. However, this doesn't solve the original issue.

    When I try to rebuild DBD-mysql manually by downloading it (http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm) and using:

    perl Makefile.PL --cflags=-I/usr/include/mysql --libs="-L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64 -lssl -lcrypto"

    and do a make, it complains:

    Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
    Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located


    Alas, with the standard install of mysql-server, mysql-client and mysql-shared, there is NO mysql_config file on my system, hence no way to specify a location for it.

    Presuming the build worked, when trying to make, it fails with:

    dbdimp.h:22:49: error: mysql.h: No such file or directory
    dbdimp.h:23:45: error: mysqld_error.h: No such file or directory
    dbdimp.h:25:49: error: errmsg.h: No such file or directory
    In file included from dbdimp.c:20:
    dbdimp.h:144: error: expected specifier-qualifier-list before âMYSQLâ
    dbdimp.h:237: error: expected specifier-qualifier-list before âMYSQL_RESâ


    and lots of other gibberish.

    I'm running out of options. I've re-installed mysql and even re-installed perl. All other isues with this module seem easily resolved -- just not mine. Any assistance is appreciated. Thanks.
      http://forums.mysql.com/read.php?51,54411,86062#msg-86062 The development files, including mysql_config, are in the MySQL-devel-standard-xxxx.yyy.rpm package. The actual package name is somewhat obscurely listed on the MySQL downloads page as 'Headers and libraries':

      So whatever YUM is ... you didnt install everything needed (didn't read enough README/INSTALL files)

        Turns out the issue was an old zlib-devel package. For reference, the latest version was not included in the standard RHEL5 install. When running Bugzilla's checksetup.pl, it suggested this could be the issue. After doing a fresh install, it installed fine.

        Thanks for the assistance.

        Also, for reference, YUM is Redhat's package manager (like Debian's apt-get).