当前位置: 首页 > 工具软件 > DBD-mysql > 使用案例 >

mac perl dbd mysql_在MacOs Lion上安装Perl DBD-mysql-4.021是否需要MySQL头?

魏浩广
2023-12-01

我尝试在MacOS Lion上安装DBD-mysql-4.021,但是当我这样做时,它错过了一些头文件。

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 - >无法安装),我应该如何在Perl中使用MySQL?

我通过这个链接再次从DMG安装了mysql [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)

 类似资料: