首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

Warning: prerequisite DBD:mysql 1 not found异常解决方案

2013-03-17 
Warning: prerequisite DBD::mysql 1 not found错误解决方案在使用perl编译的 DBD::mysql 的时候,进程提示

Warning: prerequisite DBD::mysql 1 not found错误解决方案

在使用perl编译的 DBD::mysql 的时候,进程提示无法编译成功,这里想需要我们手动进行编译相关的包文件;相关错误如下所示;

[root@Slave02 ~]# lsanaconda-ks.cfg         innotop-1.8.1.tar.gz  sleep.sha.pl                    input.txt             success_test.sha.txt                   install.log           tablesize.sqlbug.sh                  install.log.syslog    temp.ttcmake-2.8.5.tar.gz      let.sh                time_take.shDBD-mysql-4.018.tar.gz  log.txt               tuning-primer.shdebug.sh                my_program            us.shDesktop                 mysqlspp.sql          xtrabackup-1.6.5.tar.gzfile.sh                 out.txt[root@Slave02 ~]# tar xzvf DBD-mysql-4.018.tar.gz DBD-mysql-4.018/DBD-mysql-4.018/ChangeLogDBD-mysql-4.018/constants.hDBD-mysql-4.018/dbdimp.cDBD-mysql-4.018/dbdimp.hDBD-mysql-4.018/eg/DBD-mysql-4.018/eg/bug14979.plDBD-mysql-4.018/eg/bug21028.plDBD-mysql-4.018/eg/bug30033.plDBD-mysql-4.018/eg/bug30033pg.plDBD-mysql-4.018/eg/decimal_test.plDBD-mysql-4.018/eg/issue21946.plDBD-mysql-4.018/eg/prepare_memory_usage.plDBD-mysql-4.018/eg/proc_example1.plDBD-mysql-4.018/eg/proc_example2.plDBD-mysql-4.018/eg/proc_example2a.plDBD-mysql-4.018/eg/proc_example2b.plDBD-mysql-4.018/eg/proc_example3.plDBD-mysql-4.018/eg/proc_example4.plDBD-mysql-4.018/INSTALL.htmlDBD-mysql-4.018/lib/DBD-mysql-4.018/lib/Bundle/DBD-mysql-4.018/lib/Bundle/DBD/DBD-mysql-4.018/lib/Bundle/DBD/mysql.pmDBD-mysql-4.018/lib/DBD/DBD-mysql-4.018/lib/DBD/mysql/DBD-mysql-4.018/lib/DBD/mysql/GetInfo.pmDBD-mysql-4.018/lib/DBD/mysql/INSTALL.podDBD-mysql-4.018/lib/DBD/mysql.pmDBD-mysql-4.018/Makefile.PLDBD-mysql-4.018/Makefile.PL.embeddedDBD-mysql-4.018/MANIFESTDBD-mysql-4.018/MANIFEST.SKIPDBD-mysql-4.018/META.ymlDBD-mysql-4.018/myldDBD-mysql-4.018/mysql.xsDBD-mysql-4.018/READMEDBD-mysql-4.018/t/DBD-mysql-4.018/t/00base.tDBD-mysql-4.018/t/10connect.tDBD-mysql-4.018/t/20createdrop.tDBD-mysql-4.018/t/25lockunlock.tDBD-mysql-4.018/t/29warnings.tDBD-mysql-4.018/t/30insertfetch.tDBD-mysql-4.018/t/31insertid.tDBD-mysql-4.018/t/32insert_error.tDBD-mysql-4.018/t/35limit.tDBD-mysql-4.018/t/35prepare.tDBD-mysql-4.018/t/40bindparam.tDBD-mysql-4.018/t/40bindparam2.tDBD-mysql-4.018/t/40blobs.tDBD-mysql-4.018/t/40catalog.tDBD-mysql-4.018/t/40keyinfo.tDBD-mysql-4.018/t/40listfields.tDBD-mysql-4.018/t/40nulls.tDBD-mysql-4.018/t/40nulls_prepare.tDBD-mysql-4.018/t/40numrows.tDBD-mysql-4.018/t/40server_prepare.tDBD-mysql-4.018/t/40server_prepare_error.tDBD-mysql-4.018/t/40types.tDBD-mysql-4.018/t/41bindparam.tDBD-mysql-4.018/t/41blobs_prepare.tDBD-mysql-4.018/t/42bindparam.tDBD-mysql-4.018/t/50chopblanks.tDBD-mysql-4.018/t/50commit.tDBD-mysql-4.018/t/51bind_type_guessing.tDBD-mysql-4.018/t/52comment.tDBD-mysql-4.018/t/53comment.tDBD-mysql-4.018/t/55utf8.tDBD-mysql-4.018/t/60leaks.tDBD-mysql-4.018/t/65types.tDBD-mysql-4.018/t/70takeimp.tDBD-mysql-4.018/t/71impdata.tDBD-mysql-4.018/t/75supported_sql.tDBD-mysql-4.018/t/76multi_statement.tDBD-mysql-4.018/t/80procs.tDBD-mysql-4.018/t/85init_command.tDBD-mysql-4.018/t/86_bug_36972.tDBD-mysql-4.018/t/lib.plDBD-mysql-4.018/t/mem_leak.plDBD-mysql-4.018/t/mysql.dbtestDBD-mysql-4.018/t/mysql.mtestDBD-mysql-4.018/TODO[root@Slave02 ~]# cd DBD-mysql-4.018[root@Slave02 DBD-mysql-4.018]# perl Makefile.PL --mysql_config=/usr/local/mysql/bin/mysql_config PLEASE NOTE:For 'make test' to run properly, you must ensure that the database user 'root' can connect to your MySQL server and has the proper privileges that these tests require such as 'drop table', 'create table', 'drop procedure', 'create procedure'as well as others. mysql> grant all privileges on test.* to 'root'@'localhost' identified by 's3kr1t';You can also optionally set the user to run 'make test' with:perl Makefile.PL --testuser=usernameI will use the following settings for compiling and testing:  cflags        (mysql_config) = -I/usr/local/mysql/include  -g  embedded      (mysql_config) =   libs          (mysql_config) = -L/usr/local/mysql/lib -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl  mysql_config  (Users choice) = /usr/local/mysql/bin/mysql_config  nocatchstderr (default     ) = 0  nofoundrows   (default     ) = 0  ssl           (guessed     ) = 1  testdb        (default     ) = test  testhost      (default     ) =   testpassword  (default     ) =   testsocket    (default     ) =   testuser      (guessed     ) = rootTo change these settings, see 'perl Makefile.PL --help' and'perldoc INSTALL'.Checking if your kit is complete...Looks goodMultiple copies of Driver.xst found in: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBI/ /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/DBI/ at Makefile.PL line 907Using DBI 1.623 (for perl 5.008008 on i386-linux-thread-multi) installed in /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBI/Writing Makefile for DBD::mysqlWriting MYMETA.yml and MYMETA.json[root@Slave02 DBD-mysql-4.018]# make cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pmcp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pmcp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.podcp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pmgcc -c  -I/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBI -I/usr/local/mysql/include  -g -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables   -DVERSION=\"4.018\" -DXS_VERSION=\"4.018\" -fPIC "-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE"   dbdimp.cdbdimp.c: In function 鈉ount_params?dbdimp.c:94: warning: suggest parentheses around assignment used as truth valuedbdimp.c:137: warning: suggest parentheses around assignment used as truth valuedbdimp.c: In function 鈊bd_discon_all?dbdimp.c:2172: warning: unused variable 鈏mp_xxh?dbdimp.c: In function 鈓ysql_st_prepare?dbdimp.c:2593: warning: unused variable 鈒imit_flag?/usr/bin/perl -p -e "s/~DRIVER~/mysql/g" /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBI/Driver.xst > mysql.xsi/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap  mysql.xs > mysql.xsc && mv mysql.xsc mysql.cWarning: duplicate function definition 'do' detected in mysql.xs, line 225Warning: duplicate function definition 'rows' detected in mysql.xs, line 650gcc -c  -I/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBI -I/usr/local/mysql/include  -g -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables   -DVERSION=\"4.018\" -DXS_VERSION=\"4.018\" -fPIC "-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE"   mysql.cmysql.xs: In function 釾S_DBD__mysql__db_do?mysql.xs:242: warning: unused variable 鈙tatement_ptr?mysql.xs: In function 釾S_DBD__mysql__st_more_results?mysql.xs:588: warning: implicit declaration of function 鈓ysql_st_next_results?mysql.xs:587: warning: unused variable 鈘etval?mysql.xs: In function 釾S_DBD__mysql__GetInfo_dbd_mysql_get_info?mysql.xs:724: warning: implicit declaration of function 鈏s_prefix?Running Mkbootstrap for DBD::mysql ()chmod 644 mysql.bsrm -f blib/arch/auto/DBD/mysql/mysql.soLD_RUN_PATH="/usr/local/mysql/lib:/lib" /usr/bin/perl myld gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -L/usr/local/lib dbdimp.o mysql.o  -o blib/arch/auto/DBD/mysql/mysql.so        \           -L/usr/local/mysql/lib -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl      \          chmod 755 blib/arch/auto/DBD/mysql/mysql.socp mysql.bs blib/arch/auto/DBD/mysql/mysql.bschmod 644 blib/arch/auto/DBD/mysql/mysql.bsManifying blib/man3/DBD::mysql.3pmManifying blib/man3/DBD::mysql::INSTALL.3pmManifying blib/man3/Bundle::DBD::mysql.3pm[root@Slave02 DBD-mysql-4.018]# make installFiles found in blib/arch: installing files in blib/lib into architecture dependent library treeInstalling /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql/mysql.soInstalling /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql/mysql.bsInstalling /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Bundle/DBD/mysql.pmInstalling /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/DBD/mysql.pmInstalling /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/DBD/mysql/INSTALL.podInstalling /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/DBD/mysql/GetInfo.pmInstalling /usr/share/man/man3/Bundle::DBD::mysql.3pmInstalling /usr/share/man/man3/DBD::mysql.3pmInstalling /usr/share/man/man3/DBD::mysql::INSTALL.3pmAppending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod[root@Slave02 DBD-mysql-4.018]# 

热点排行