在MacOs-Lion上安装PerlDBD-mysql-4.021是否需要mysql头



我试图在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:
....

我试着从这里安装MySQL的二进制文件。我可以安装,但它不起作用。或者用macports安装(mysql5-devel->cannot install),我应该怎么做才能用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)

是的,您必须安装MySQL才能让客户端工作,因为它取决于MySQL客户端代码。我通常使用MySQL提供的DMG下载,其中包括MySQL的安装程序、启动脚本的安装程序和首选项窗格:

  • http://www.mysql.com/downloads/mysql/

确保为您的系统获得正确的平台编辑:正如昆汀所指出的,问题是关于Lion的,它总是64位的。

我自己找到了解决方案,我使用的是mysql的MAMP安装目录,但显然它不完整,所以在重新安装mysql后,我只使用了这个选项:

sudo perle Makefile.pl --mysqlconfig=/usr/local/mysql/bin/mysqlconfig

相关内容

  • 没有找到相关文章

最新更新