最近装snort总出现一些问题,在装完mysql-5.0.22后想要运行测试一下,出现了一大堆错误。下面就把几天的心得写下,供碰到问题的朋友参考。
错误问题:
1.安装了mysql后,运行./run-all-tests时出现:
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at (eval 51) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: ExampleP, Pg, Proxy.
at /usr/local/mysql/sql-bench/server-cfg line 247
2.于是就安装DBD-mysql-4.013.tar.gz,安装后再运行出现:
/usr/bin/perl: relocation error: /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBD/mysql/mysql.so: undefined symbol: DBIc_TRACE_LEVEL
解决:
1.mysql-5.0.22的安装:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> tar -zxvf mysql-5.0.22.tar.gz
shell> cd mysql-5.0.22
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
2.DBD-mysql-3.0008.tar.gz的安装:
shell> tar -zxvf DBD-mysql-3.0008.tar.gz
shell> cd DBD-mysql-3.0008
shell> export LANG=C
shell> perl Makefile.PL \
--libs="-L/usr/local/mysql/lib/mysql -lmysqlclient -lz" \
--cflags=-I/usr/local/mysql/include/mysql \
--testhost=127.0.0.1 \
--mysql_config=/usr/local/mysql/bin/mysql_config
shell> make
shell> make install
注:安装DBD-mysql-4.013.tar.gz后出现问题属于版本问题,改用DBD-mysql-3.0008.tar.gz后就可以正常运行mysql的./run-all-tests --user=root --password=******。
阅读(1696) | 评论(0) | 转发(0) |