Chinaunix首页 | 论坛 | 博客
  • 博客访问: 554479
  • 博文数量: 104
  • 博客积分: 4131
  • 博客等级: 上校
  • 技术积分: 1137
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-31 15:05
文章分类

全部博文(104)

文章存档

2011年(13)

2010年(23)

2009年(68)

我的朋友

分类: LINUX

2009-10-20 10:52:39

   最近装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) |
给主人留下些什么吧!~~