Can't install Perl DBI or DBD::mysql after Mountain Lion upgrade
I recently upgraded to Mountain Lion and found that my Perl DBI scripts stopped working, with the error message "Can't locate DBD/mysql.pm in @INC".
The last time this happened, after upgrading to Lion, the solution was to install the new version of Xcode. Then I was able to use the Perl CPAN module to install DBI and DBD::mysql. (MySQL is already installed and running with no problem on the Mountain Lion machine.)
Now I have installed Xcode 4.5.1, and tried
mrb% sudo perl -MCPAN -e shell
[then CPAN configures itself]
cpan[1]> install DBI
and it fails with this final message:
/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/perl.h:583:11: fatal error:
'sys/types.h' file not found
# include <sys/types.h>
^
1 error generated.
make: *** [Perl.o] Error 1
TIMB/DBI-1.622.tar.gz
/Developer/usr/bin/make -- NOT OK
'YAML' not installed, will not store persistent state
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
TIMB/DBI-1.622.tar.gz : make NO
Can anybody help?