HOWTO setup DBI and DBD::mysql on osx

From Chaos

Jump to: navigation, search
This article is part of the HOWTO series.


Summary

I had a hard time installing DBI and DBD::mysql on OS X 10.3, so I've included the steps below to install it.


Details

1. SSH into your server, and run the following, it should drop you to the cpan shell:

root@localhost:~# perl -MCPAN -e shell

2. Run the following set of commands within the cpan shell. The install of DBD::mysql will probably fail, but that is OK:

cpan> force install DBI
cpan> force install DBD::mysql

3. We need to change some environment build options for the DBD::mysql module. Do the following to change it:

cpan> look DBD::mysql
sh-2.05b# perl -pi -e's/MACOSX/env MACOSX/' Makefile
sh-2.05b# perl -pi -e's/-arch i386 -arch ppc/-arch ppc/' Makefile
sh-2.05b# make
sh-2.05b# make install
sh-2.05b# exit
cpan> exit

4. Done!

Personal tools
Namespaces
Variants
Actions
Navigation
Sponsored Links
Toolbox