mysqlreport ----Perl-安装DBI,Mysql DBD模块

本文介绍了在使用Perl的CPAN shell安装DBI和DBD::mysql模块时遇到的问题及解决方案。当尝试安装这些模块时,会因为缺少必要的系统库而出现错误。文章提供了具体的步骤来解决这些问题,包括安装libc6-dev和libmysqlclient-dev软件包。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

perl -MCPAN -e shell


cpan1>intall DBI

1>usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/perl.h:587:24: 错误:sys/types.h:没有那个文件或目录

解决办法:

安装软件包:libc6-dev


cpan2>intall DBD::mysql

2>Trying to install Perl-Mysql DBD, mysql_config can't be found

perl Makefile.pl --testuser=username

Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Failed to determine directory of mysql.h. Use

  perl Makefile.PL --cflags=-I


解决办法:sudo apt-get install libmysqlclient-dev

 

If you installed the mysql server that everybody installs:sudo apt-get install mysql-server (or something like this)

you are missing a few extra files on which the makefile for this perl module depends.

You can try to work around this issue by installing the following package:sudo apt-get install libmysqlclient-dev


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值