[root@localhost ~]# cd /opt/
[root@localhost opt]# rpm -qa mysql
mysql-5.0.45-7.1AXS3
mysql-5.0.45-7.1AXS3
[root@localhost opt]# rpm -e mysql-5.0.45-7.1AXS3
error: "mysql-5.0.45-7.1AXS3" specifies multiple packages
[root@localhost opt]# rpm -e mysql*
error: package mysql* is not installed
[root@localhost opt]# whereis mysql
mysql: /usr/bin/mysql /usr/lib/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
[root@localhost opt]# whereis mysql
mysql: /usr/bin/mysql /usr/lib/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
[root@localhost opt]# rpm -e mysql-5.0.45-7.1AXS3
error: "mysql-5.0.45-7.1AXS3" specifies multiple packages
[root@localhost opt]# rpm -e mysql-5.0.45-7.1AXS3 --nodeps
error: "mysql-5.0.45-7.1AXS3" specifies multiple packages
[root@localhost opt]# rpm -e mysql-5.0.45-7.1AXS3 --allmatches
error: Failed dependencies:
libmysqlclient.so.15()(64bit) is needed by (installed) php-mysql-5.1.6-23.2AXS3.x86_64
libmysqlclient.so.15()(64bit) is needed by (installed) perl-DBD-MySQL-3.0007-2AXS3.x86_64
libmysqlclient.so.15()(64bit) is needed by (installed) cyrus-sasl-sql-2.1.22-4.x86_64
libmysqlclient.so.15()(64bit) is needed by (installed) mysql-connector-odbc-3.51.12-2.2.x86_64
libmysqlclient.so.15()(64bit) is needed by (installed) mysql-server-5.0.45-7.1AXS3.x86_64
libmysqlclient.so.15()(64bit) is needed by (installed) libdbi-dbd-mysql-0.8.1a-1.2.2.x86_64
libmysqlclient.so.15()(64bit) is needed by (installed) qt-MySQL-3.3.6-23.1AXS3.x86_64
libmysqlclient.so.15()(64bit) is needed by (installed) postfix-2.3.3-2.9AXS3.x86_64
libmysqlclient.so.15()(64bit) is needed by (installed) mod_auth_mysql-3.0.0-3.2AXS3.x86_64
libmysqlclient.so.15()(64bit) is needed by (installed) dovecot-1.0.7-7.1AXS3.x86_64
libmysqlclient.so.15()(64bit) is needed by (installed) mysql-devel-5.0.45-7.1AXS3.x86_64
libmysqlclient.so.15()(64bit) is needed by (installed) zabbix-proxy-mysql-1.6.4-3AXS3.x86_64
libmysqlclient.so.15()(64bit) is needed by (installed) zabbix-server-mysql-1.6.4-3AXS3.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) php-mysql-5.1.6-23.2AXS3.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) perl-DBD-MySQL-3.0007-2AXS3.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) cyrus-sasl-sql-2.1.22-4.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) mysql-connector-odbc-3.51.12-2.2.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) mysql-server-5.0.45-7.1AXS3.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) libdbi-dbd-mysql-0.8.1a-1.2.2.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) qt-MySQL-3.3.6-23.1AXS3.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) postfix-2.3.3-2.9AXS3.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) mod_auth_mysql-3.0.0-3.2AXS3.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) dovecot-1.0.7-7.1AXS3.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) zabbix-proxy-mysql-1.6.4-3AXS3.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) zabbix-server-mysql-1.6.4-3AXS3.x86_64
libmysqlclient_r.so.15()(64bit) is needed by (installed) mysql-connector-odbc-3.51.12-2.2.x86_64
libmysqlclient_r.so.15()(64bit) is needed by (installed) mysql-server-5.0.45-7.1AXS3.x86_64
libmysqlclient_r.so.15()(64bit) is needed by (installed) MySQL-python-1.2.1-1.x86_64
libmysqlclient_r.so.15()(64bit) is needed by (installed) mysql-devel-5.0.45-7.1AXS3.x86_64
libmysqlclient_r.so.15()(64bit) is needed by (installed) freeradius-mysql-1.1.3-1.4AXS3.x86_64
libmysqlclient_r.so.15(libmysqlclient_15)(64bit) is needed by (installed) mysql-connector-odbc-3.51.12-2.2.x86_64
libmysqlclient_r.so.15(libmysqlclient_15)(64bit) is needed by (installed) mysql-server-5.0.45-7.1AXS3.x86_64
libmysqlclient_r.so.15(libmysqlclient_15)(64bit) is needed by (installed) MySQL-python-1.2.1-1.x86_64
libmysqlclient_r.so.15(libmysqlclient_15)(64bit) is needed by (installed) freeradius-mysql-1.1.3-1.4AXS3.x86_64
mysql = 5.0.45-7.1AXS3 is needed by (installed) mysql-server-5.0.45-7.1AXS3.x86_64
mysql is needed by (installed) MySQL-python-1.2.1-1.x86_64
mysql is needed by (installed) libdbi-dbd-mysql-0.8.1a-1.2.2.x86_64
mysql = 5.0.45-7.1AXS3 is needed by (installed) mysql-bench-5.0.45-7.1AXS3.x86_64
mysql is needed by (installed) postfix-2.3.3-2.9AXS3.x86_64
mysql = 5.0.45-7.1AXS3 is needed by (installed) mysql-devel-5.0.45-7.1AXS3.x86_64
mysql = 5.0.45-7.1AXS3 is needed by (installed) mysql-devel-5.0.45-7.1AXS3.i386
mysql is needed by (installed) freeradius-mysql-1.1.3-1.4AXS3.x86_64
libmysqlclient.so.15 is needed by (installed) cyrus-sasl-sql-2.1.22-4.i386
libmysqlclient.so.15 is needed by (installed) mysql-devel-5.0.45-7.1AXS3.i386
libmysqlclient.so.15(libmysqlclient_15) is needed by (installed) cyrus-sasl-sql-2.1.22-4.i386
libmysqlclient_r.so.15 is needed by (installed) mysql-devel-5.0.45-7.1AXS3.i386
提示出现了multiple packages
解决方法是:
rpm -e --allmatches --nodeps
[root@localhost opt]# rpm -e mysql-5.0.45-7.1AXS3 --allmatches --nodeps
[root@localhost opt]#
[root@localhost opt]# rpm -e mysql-5.0.45-7.1AXS3 --allmatches --nodeps
[root@localhost opt]# whereis mysql
mysql: /usr/lib/mysql /usr/include/mysql /usr/share/mysql
[root@localhost opt]# rm -rf /usr/lib/mysql
[root@localhost opt]# rm -rf /usr/include/mysql
[root@localhost opt]# rm -rf /usr/share/mysql
[root@localhost opt]#