Linux rpm -e --nodeps rpm解除安裝

xikunyun發表於2020-05-05

兩個關鍵點:
1.如果提示有xxx.rpm包已經被installed了,那麼先用rpm -e –nodeps xxx來解除安裝
2.如果存在多個版本的話,用rpm -e –allmatches來解除安裝

[root@mysqldb2 ~]# rpm -e –nodeps perl-URI
[root@mysqldb2 ~]# rpm -e –nodeps perl-DBD-MySQL
[root@mysqldb2 ~]# rpm -e –nodeps perl-Compress-Zlib
[root@mysqldb2 ~]# rpm -e –nodeps perl-HTML-Tagset
[root@mysqldb2 ~]# rpm -e –nodeps perl-HTML-Parser
[root@mysqldb2 ~]# rpm -e –nodeps perl-libwww-perl
[root@mysqldb2 ~]# rpm -e –nodeps mysql
error: “mysql” specifies multiple packages
[root@mysqldb2 ~]#
[root@mysqldb2 ~]# rpm -qa | grep mysql
mysql-5.0.77-4.el5_6.6
libdbi-dbd-mysql-0.8.1a-1.2.2
mysql-5.0.77-4.el5_6.6
mysql-server-5.0.77-4.el5_6.6
mysql-connector-odbc-3.51.26r1127-2.el5
[root@mysqldb2 ~]# rpm -e –allmatches libdbi-dbd-mysql-0.8.1a-1.2.2
[root@mysqldb2 ~]# rpm -e –allmatches mysql-connector-odbc-3.51.26r1127-2.el5
[ @mysqldb2 ~]# rpm -e –allmatches mysql-server-5.0.77-4.el5_6.6
[root@m
ysqldb2 ~]# rpm -e –allmatches mysql-5.0.77-4.el5_6.6
error: Failed dependencies:
libmysqlclient_r.so.15()(64bit) is needed by (installed) MySQL-python-1.2.3-0.1.c1.el5.x86_64
libmysqlclient_r.so.15(libmysqlclient_15)(64bit) is needed by (installed) MySQL-python-1.2.3-0.1.c1.el5.x86_64
[root@mysqldb2 ~]# rpm -e –allmatches  -python-1.2.3-0.1.c1.el5.x86_64
[root@mysqldb2 ~]# rpm -e –allmatches mysql-5.0.77-4.el5_6.6
[root@mysqldb2 ~]# rpm -qa | grep mysql
[root@mysqldb2 ~]


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69971605/viewspace-2689934/,如需轉載,請註明出處,否則將追究法律責任。

相關文章