I try to install DBD-mysql-4.021 on MacOS Lion, but it seems when I do, it misses some header file.
MacBook-Pro-de-benoit:DBD-mysql-4.021-XXi0wV vanalder$ sudo make
llvm-gcc-4.2 -c -I/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBI -I/Applications/MAMP/Library/include -fno-omit-frame-pointer -g -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include -Os -DVERSION=\"4.021\" -DXS_VERSION=\"4.021\" "-I/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE" dbdimp.c In file included from dbdimp.c:20:
dbdimp.h:24:49: error: mysql.h: No such file or directory
dbdimp.h:25:45: error: mysqld_error.h: No such file or directory
dbdimp.h:27:49: error: errmsg.h: No such file or directory In file included from dbdimp.c:20: dbdimp.h:159: error: expected specifier-qualifier-list before ‘MYSQL’ dbdimp.h:257: error: expected specifier-qualifier-list before ‘MYSQL_RES’ In file included from dbdimp.c:20:
....
I tried installing binaries of MySQL from here. I can install but it doesn't work. Or install it with macports (mysql5-devel -> cannot install), what should I do to use MySQL with Perl?
I installed again mysql from a DMG from this link [http://www.mysql.com/downloads/mysql/][1]http://www.mysql.com/downloads/mysql/ but i still have the same error when i make
sudo make
dbdimp.h:24:49: error: mysql.h: No such file or directory
dbdimp.h:25:45: error: mysqld_error.h: No such file or directory
dbdimp.h:27:49: error: errmsg.h: No such file or directory
In file included from dbdimp.c:20:
dbdimp.h:159: error: expected specifier-qualifier-list before ‘MYSQL’
dbdimp.h:257: error: expected specifier-qualifier-list before ‘MYSQL_RES’
In file included from dbdimp.c:20:
....
It's the first time i have trouble to install a CPAN module (Xcode install and a GCC compiler k)
I found the solution by myself, i was using the MAMP installation directory of mysql but obviously it's not complete, so after reinstalled mysql i simply used this option for :