Posted on 2009-07-06 04:41:50-07 by stephenmcgowan
Install problems - a closer look:
I have tried initially to install manually. I have gone into the Makefile.PL with:
sudo perl Makefile.PL
The initial process is shown below in the code snippet.
PLEASE NOTE: For 'make test' to run properly, you must ensure that the database user 'root' can connect to your MySQL server and has the proper privileges that these tests require such as 'drop table', 'create table', 'drop procedure', 'create procedure' as well as others. mysql> grant all privileges on test.* to 'root'@'localhost' identified by 's3kr1t'; You can also optionally set the user to run 'make test' with: perl Makefile.pl --testuser=username I will use the following settings for compiling and testing: cflags (mysql_config) = -I/usr/local/mysql/include -g -Os -arch i386 -fno-common -D_P10 +03_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DE +CLARE_CXA_PURE_VIRTUAL embedded (mysql_config) = libs (mysql_config) = -L/usr/local/mysql/lib -lmysqlclient -lz -lm -lmygcc mysql_config (guessed ) = mysql_config nocatchstderr (default ) = 0 nofoundrows (default ) = 0 ssl (guessed ) = 0 testdb (default ) = test testhost (default ) = testpassword (default ) = testsocket (default ) = testuser (guessed ) = root To change these settings, see 'perl Makefile.PL --help' and 'perldoc INSTALL'. Using DBI 1.52 (for perl 5.008008 on darwin-thread-multi-2level) installed in /System/Library/Perl/ +Extras/5.8.8/darwin-thread-multi-2level/auto/DBI/ Writing Makefile for DBD::mysql

So from what i understand in the above.. is that DBI cannot find the cflags and libs directories in my usr/local/mysql folder.
So i think i have solved the problem, only problem is, i'm kinda new to Unix so i don't know how to go about this in terms of code.
First thing i'd probably need to locate the actual directories of cflags and libs, as they're most probably not in the directories listed above.
Secondly i'd need to get into the Makefile.pl (/Users/stevey_mac2k2/.cpan/build/DBD-mysql-4.012/Makefile.pl) and edit these pathways for cflags and libs.
so firstly i'm not sure how to locate cflags and libs, and secondly i'm not sure how to modify Makefile.pl and give cflags and libs new directories.
Furthermore, from a MySQL perspective:
I have MySQL saved in /usr/local/ (with two folders here: "mysql" and "mysql-5.1.36-osx10.5-x86"
If i run mysql_config... it returns the following:
Usage: /usr/local/mysql-5.1.36-osx10.5-x86/bin/mysql_config [OPTIONS] Options: --cflags [-I/usr/local/mysql-5.1.36-osx10.5-x86/include -g -Os -arch i386 -fno-com +mon -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUI +T -DDONT_DECLARE_CXA_PURE_VIRTUAL] --include [-I/usr/local/mysql-5.1.36-osx10.5-x86/include] --libs [-L/usr/local/mysql-5.1.36-osx10.5-x86/lib -lmysqlclient -lz -lm -lmyg +cc] --libs_r [-L/usr/local/mysql-5.1.36-osx10.5-x86/lib -lmysqlclient_r -lz -lm -lm +ygcc] --plugindir [/usr/local/mysql/lib/plugin] --socket [/tmp/mysql.sock] --port [0] --version [5.1.36] --libmysqld-libs [-L/usr/local/mysql-5.1.36-osx10.5-x86/lib -lmysqld -ldl -lz -lm -l +mygcc]
Hope This Helps. Thanks.
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.