安装Mysql-5.0.27,编译时出错

[root@loacalhost\]#for i in 'rpm -qa|grep i mysql'
>do rpm -e $i --dodeps
>done
-qa|grep:unknown option


怎么删除不了MYSQL  


Note: The following compile may take a long time.
If it fails, re-run configure with --with-low-memory
g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local\mysql\"" -DDATADIR="\"/usr/mysql/var\"" -DSHAREDIR="\"/usr/mysql/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../innobase/include -I../include -I../include -I../regex -I. -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -c sql_yacc.cc