Solved

installing Perl's DBD-mysql module on Cygwin

Posted on 2004-09-09
4
587 Views
Last Modified: 2008-02-01
I downloaded the DBD-mysql-2.9004 module from CPAN and am attempting to install it so that my Perl scripts running in the Cygwin environment can access an Mysql database. However, here's the output of my attempt to generate a Makefile, by having Perl interpret Makefile.PL:
~/mg/DBD-mysql-2.9004# perl Makefile.PL --cflags=-I/cygdrive/c/mysql/include
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Failed to determine directory of libmysqlclient.a|libmysqlclient.so. Use

  perl Makefile.PL "--libs=-L<dir> -lmysqlclient"

to set this directory. For details see the INSTALL.html file,
section "Linker flags" or type

  perl Makefile.PL --help
~/mg/DBD-mysql-2.9004#


The trouble is that I don't have any files on my hard drive named libmysqlclient.a or libmysqlclient.so. Any idea of how I can get solve or get around this?

Thanks.
0
Comment
Question by:bobwood2000
  • 3
4 Comments
 
LVL 26

Accepted Solution

by:
ushastry earned 250 total points
ID: 12023909
Hi,

To install the DBI and DBD::mysql modules on a Unix-like OS or Perl on Windows installed as part of Cygwin, run the following commands.

Note that you must have MySQL already installed or you will not be able to install the DBD::mysql module. Also, if you haven’t installed any other modules this way, you’ll be asked for configuration options. Luckily, these are self-explanatory. Once you've finished entering the configuration values, the module installation will start.

perl –MCPAN –e 'install DBI'
perl –MCPAN –e 'install DBD::mysql'
You'll see several screens of text fly by, but eventually it should return you to the friendly command prompt.

take a look at fo more..

http://search.cpan.org/~jwied/DBD-mysql-2.1026/lib/DBD/mysql/INSTALL.pod
0
 

Author Comment

by:bobwood2000
ID: 12029871
"perl –MCPAN –e 'install DBD::mysql' " gives me error messages, likely because CPAN isn't configured correctly. I think the problem is that my home directory has a space between my first and last name. CPAN doesn't seem to be able to deal with this. For example, the path should be /home/Robert Wood. CPAN prints: cannot open /home/Robert: no such file. I've tried changing where it stores files, but 'o conf' doesn't seem to make the right changes. Any advice?

Thanks.
0
 

Author Comment

by:bobwood2000
ID: 12036350
Okay, I got CPAN(Plus) working. Install DBD::mysql via CPANPLUS gives me the same errors as when I was installing DBD::mysql manually.
0
 

Author Comment

by:bobwood2000
ID: 12036372
I found the solution to this problem:

http://search.cpan.org/src/RUDY/DBD-mysql-2.9004/INSTALL.html#windows/cygwin

Amazingly, installing the DBD::mysql requires compiling MySQL within the Cygwin environment. It's crazy enough to work, and is probably the only way to do it.

Moderators: Please refund my points, but leave up this solution in case any one is searching for the same error messages I had. Thanks.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question