1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Installing DBD Doesn't Work

Discussion in 'Plesk for Linux - 8.x and Older' started by bray, Jan 8, 2006.

  1. bray

    bray Guest

    0
     
    I read from this thread that there's only certain versions of DBI and DBD now that work with 7.5.4:

    http://forums.sw-soft.com/showthread.php?s=&threadid=23201&highlight=DBD

    I then tried to install the DBD MySQL module and get this error:

    webprosinc# perl Makefile.PL
    Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
    Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
    Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
    Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
    Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.

    Does anyone have DBD MySQL working in version 7.5.4? I had it working fine in 7.0.4.
     
  2. spandox

    spandox Guest

    0
     
    yum or cpan

    I have fedora and
    yum install perl-DBD-MySQL
    There may be some equiv in whatever you are using.

    worked great

    You could also try

    perl -MCPAN -e shell

    and then type:
    install Bundle::DBD::mysql

    That may work for you.
     
  3. bray

    bray Guest

    0
     
    What version are you using Spandox? I tried the following:

    DBD-mysql-2.9004
    DBD-mysql-2.1028

    I had to put the flags in the the mysql.h file and the libs, and now I get this returned:

    Warning: duplicate function definition 'rows' detected in mysql.xs, line 291
    cc -c -I/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/DBI -I/usr/local/psa/mysql/include/mysql -DVERSION=\"2.1
    028\" -DXS_VERSION=\"2.1028\" -DPIC -fpic -I/usr/libdata/perl/5.00503/mach/CORE mysql.c
    mysql.xs: In function `XS_DBD__mysql__dr__admin_internal':
    mysql.xs:101: too few arguments to function `mysql_shutdown'
    *** Error code 1

    Help?
     
  4. spandox

    spandox Guest

    0
     
    Why are you reinventing the wheel? The auto installers are your friends.
     
  5. bray

    bray Guest

    0
     
    Not sure I'm following you, this is on a FreeBSD 4.9 box. I'm just downloading the perl modules and make making installing them. Both of these required the flags so they knew where to look for the mysql components. Are you using a different DBD library?
     
  6. spandox

    spandox Guest

    0
     
    use CPAN to install them for you. CPAN is your friend.
     
  7. bray

    bray Guest

    0
     
    Actually, I got it to work using the flags on a different version. Thanks!

    Eric
     
  8. spandox

    spandox Guest

    0
     
    Even if you did it was the wrong way. The reason to use CPAN or yum is not ONLY to make it easier - it is to make it easier to update. Someone else has done the work for you. They figured out those little options - but you get another bonus - if you use them to install - you can use them to upgrade. Once you start down the custom configuration path there is no turning back and no one to help you. If you installed Bundle::mysql then CPAN knows how to upgrade you next time.
     
  9. bray

    bray Guest

    0
     
    Hi Spandox,

    I think I'd like to try it your way then, thanks for the tips. Do I just remove the DBD folder I currently have set up, or is there some sort of uninstall process/command that needs to be used?

    Eric
     
  10. spandox

    spandox Guest

    0
     
    If you have it working I would leave your install in place as you do this.

    I am not too familiar with FreeBSD but I recall using the ports collect.

    http://www.freebsd.org/ports/

    depending on which version of mysql you have I would suggest one of the following:
    p5-DBD-mysql-3.0002
    p5-DBD-mysql40-3.0002
    p5-DBD-mysql41-3.0002
    p5-DBD-mysql50-3.0002

    It will handle all of the dependancies.

    I know fedora better - in fedora you just use the "yum" command. Debian has a yum command too - or at least an up2date

    Try above first......

    Barring that I would use CPAN (a built in part of perl)

    perl -MCPAN -e 'install Bundle::DBD::mysql'

    It is really a question of order. Other people have done the work. Use the OS level installs when available - they are stable and work with everything. Only if there is no OS level install for it use the perl installer. You should only resort to compiling if you are doing something VERY custom.
     
  11. bray

    bray Guest

    0
     
    I have decided to try the Cpan autoinstaller since it appears the install of my previous DBD isn't working properly. I get this:

    cpan> install Bundle::DBD::mysql
    DBI is up to date.

    The module Data::ShowTable isn't available on CPAN.

    Either the module has not yet been uploaded to CPAN, or it is
    temporary unavailable. Please contact the author to find out
    more about the status. Try ``i Data::ShowTable''.
    Mysql is up to date.
    DBD::mysql is up to date.

    Bundle summary: The following items seem to have had installation problems:
    Data::ShowTable

    I'm thinking that I have to use some other DBD bundle?

    I looked at FreeBSD 4.9 ports and there is only one DBD bundle that I read is not safe to install.

    Thanks,

    Eric
     
  12. spandox

    spandox Guest

    0
     
    Hmmm - type updating Bundle::CPAN - then try again
     
  13. bray

    bray Guest

    0
     
    I went ahead and installed the show table pm. Now instead of erroring out, it seems to not find files on Cpan.

    cpan> install Bundle::DBD::mysql
    Please check, if the URLs I found in your configuration file
    (http://www.perl.com/CPAN/) are valid. The urllist can be edited. E.g. with
    ``o conf urllist push ftp://myurl/''

    Cannot fetch authors/01mailrc.txt.gz

    Please check, if the URLs I found in your configuration file
    (http://www.perl.com/CPAN/) are valid. The urllist can be edited. E.g. with
    ``o conf urllist push ftp://myurl/''

    Cannot fetch modules/02packages.details.txt.gz

    Please check, if the URLs I found in your configuration file
    (http://www.perl.com/CPAN/) are valid. The urllist can be edited. E.g. with
    ``o conf urllist push ftp://myurl/''

    Cannot fetch modules/03modlist.data.gz

    Trying to reinstall Cpan gives me this:

    cpan> install Bundle::CPAN
    Can't install Bundle::CPAN, don't have an associated bundle file. :-(
    at /usr/libdata/perl/5.00503/CPAN.pm line 1717
     
  14. wagnerch

    wagnerch Guest

    0
     
    FreeBSD 4.9 is ancient, but using ports or the packages is the easiest way to get up and running. Unfortunately I don't know if they still have the binary packages online for FreeBSD 4.9. But you can try the ports (if you have them installed):

    $ cd /usr/ports/databases/p5-DBD-mysql
    ## NOTE: use p5-DBD-mysql40 if you have mysql 4.0 installed
    $ make install
    $ make clean

    The only problem here is: 1. if you installed mysql by building it, then this may not work, or 2. you don't have the ports collection installed.

    The best practice with FreeBSD is to use the ports collection to build everything, because all of the inter-dependencies are already mapped out, and the ports know where to expect files to be. Your initial problem seems to be either a) you don't have the command mysql_config, or b) it is not in your path. Where is your mysql command installed? It should be in /usr/local/bin.
     
  15. bray

    bray Guest

    0
     
    Hi Wag,

    I followed your instructions and seemed to get a little farther:

    ===> Extracting for p5-DBD-mysql-2.1026_1
    >> Checksum OK for DBD-mysql-2.1026.tar.gz.
    ===> Patching for p5-DBD-mysql-2.1026_1
    ===> p5-DBD-mysql-2.1026_1 depends on file: /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/DBI.pm - found
    ===> p5-DBD-mysql-2.1026_1 depends on shared library: mysqlclient.12 - not found
    ===> Verifying install for mysqlclient.12 in /usr/ports/databases/mysql40-client
    >> mysql-4.0.15.tar.gz doesn't seem to exist in /usr/ports/distfiles/.

    It appears to be dependant on this mysqlclient.12. However, it checks about 20 FTP/download sites and then just gives up since it can't find it. I'll see if I can locate it manually.

    Thanks,

    Eric
     
  16. wagnerch

    wagnerch Guest

    0
     
    It sounds like mysql was built manually, keep in mind once your stray away from the standard packaging schemes of any OS you are pretty much on your own to build it manually from there on out.

    Can you tell me where your mysql client (mysql command) is installed, and what version it is?

    You may be a situation where you may want to hire a professionally to look at the server and see what needs to be done. Otherwise it may get worse, since none of us really know what has been done without looking at.
     
  17. bray

    bray Guest

    0
     
    MySQL was not built manually, it came with Plesk. This server has FreeBSD 4.9 installed and Plesk 7.0.4 upgraded to 7.1.7 upgraded to 7.5.4.

    There is no other software on this machine outside of a few Perl Modules I have installed.
     
  18. wagnerch

    wagnerch Guest

    0
     
    Ahh, ok. Again, can you tell us where the mysql client is located? The problem with the port is it cannot find the mysql client, because it is likely installed in a non-standard location. Which is the same problem you had building the DBD::mysql module manually.

    So once you figure that out, I would recommend making sure "mysql_config" is in your PATH and then running perl Makefile.PL again to build DBD::mysql manually.

    I personally have never used Plesk on FreeBSD, but have used FreeBSD.
     
  19. bray

    bray Guest

    0
     
    I see MySQL is installed under /usr/local/psa/mysql. I'm not sure if you want the location of some actual file or if this is what you were looking for.

    BTW, thanks for the help here, I do appreciate it.

    Eric
     
  20. wagnerch

    wagnerch Guest

    0
     
    Yeah, you need to find the directory where mysql_config is installed. If it is /usr/local/psa/mysql_config then you need to do:

    PATH=/usr/local/psa:$PATH

    and then run perl Makefile.PL again from the DBD-mysql tarball.
     
Loading...