我嘗試在MacOS Lion上安裝DBD-mysql-4.021,但是看起來當我這樣做時,它錯過了一些頭文件。在MacOs Lion上安裝Perl DBD-mysql-4.021是否需要MySQL頭文件?
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:
....
我試着從here安裝MySQL的二進制文件。我可以安裝,但它不起作用。或者用macports安裝它(mysql5-devel - >無法安裝),我應該如何使用MySQL和Perl?
我再次mysql安裝從DMG從這個鏈接[http://www.mysql.com/downloads/mysql/][1]http://www.mysql.com/downloads/mysql/ 但我仍然有同樣的錯誤,當我做
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:
....
這是我第一次有麻煩安裝一個CPAN模塊(Xcode中安裝GCC編譯器K)
你可以從MYSQL [點擊這裏](http://dev.mysql.com/downloads/mysql/#downloads) – pavel 2012-07-31 11:33:31