如何卸载php中的mysql,centOS 卸载之前的php-mysql-apache centOS怎么卸载mysql | 璞玉(POOY)...

be18001cb109db7cfcbbcfd4d11b55de.png

centos 卸载mysql-php-apache

centOS 卸载之前的 php-mysql-apache

安装完centOS系统之后不要急于去架设LAMP环境,因为系统自身就有可能自己安装这些软件。

首先需要去卸载,提到卸载可能很多人会想到,直接rpm -qa |grep 查找,查找到之后就rpm -e |grep 删除!璞玉之前也是这么做的。没什么效果,而是报错!最后查询得知得如下操作才管用!

卸载mysql:rpm -qa | grep mysq;

[root@localhost mysql]# rpm -qa|grep -i mysql

mysql-5.0.45-7.el5

[root@localhost mysql]# rpm -ev mysql-5.0.45-7.el5

error: Failed dependencies:

libmysqlclient.so.15 is needed by (installed) dovecot-1.0.7-2.el5.i386

libmysqlclient.so.15(libmysqlclient_15) is needed by (installed) dovecot-1.0.7-2.el5.i386

运行:# rpm -ev dovecot-1.0.7-2.el5.i386

然后运行:rpm -e mysql-5.0.45-7.el5

搞定!

卸载自带的php:

[root@localhost mysql]# rpm -qa |grep php

php-common-5.1.6-20.el5

[root@localhost mysql]# rpm -e php-common-5.1.6-20.el5

error: Failed dependencies:

php-common = 5.1.6-20.el5 is needed by (installed) php-cli-5.1.6-20.el5.i386

php-common = 5.1.6-20.el5 is needed by (installed) php-5.1.6-20.el5.i386

php-common = 5.1.6-20.el5 is needed by (installed) php-ldap-5.1.6-20.el5.i386

运行:# yum -y remove php-common-5.1.6-20.el5

Setting up Remove Process

Resolving Dependencies

–> Running transaction check

—> Package php-common.i386 0:5.1.6-20.el5 set to be erased

–> Processing Dependency: php-common = 5.1.6-20.el5 for package: php-cli

–> Processing Dependency: php-common = 5.1.6-20.el5 for package: php

–> Processing Dependency: php-common = 5.1.6-20.el5 for package: php-ldap

–> Running transaction check

—> Package php.i386 0:5.1.6-20.el5 set to be erased

–> Processing Dependency: php for package: piranha

—> Package php-ldap.i386 0:5.1.6-20.el5 set to be erased

—> Package php-cli.i386 0:5.1.6-20.el5 set to be erased

–> Running transaction check

—> Package piranha.i386 0:0.8.4-9.3.el5 set to be erased

–> Finished Dependency Resolution

Dependencies Resolved

=============================================================================

Package                 Arch       Version          Repository        Size

=============================================================================

Removing:

php-common              i386       5.1.6-20.el5     installed         396 k

Removing for dependencies:

php                     i386       5.1.6-20.el5     installed         2.9 M

php-cli                 i386       5.1.6-20.el5     installed         5.1 M

php-ldap                i386       5.1.6-20.el5     installed          43 k

piranha                 i386       0.8.4-9.3.el5    installed         5.0 M

Transaction Summary

=============================================================================

Install      0 Package(s)

Update       0 Package(s)

Remove       5 Package(s)

Downloading Packages:

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

Erasing   : php-common                   ######################### [1/5]

Erasing   : php                          ######################### [2/5]

Erasing   : php-ldap                     ######################### [3/5]

Erasing   : piranha                      ######################### [4/5]

Erasing   : php-cli                      ######################### [5/5]

Removed: php-common.i386 0:5.1.6-20.el5

Dependency Removed: php.i386 0:5.1.6-20.el5 php-cli.i386 0:5.1.6-20.el5 php-ldap.i386 0:5.1.6-20.el5 piranha.i386 0:0.8.4-9.3.el5

Complete!

[root@localhost mysql]# rpm -qa |grep php

[root@localhost mysql]#

下次璞玉细说centos 安装lamp环境。怎么centos 安装lamp环境才不出错。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值