linux - centos7.2自带的Apache卸载不了
伊谢尔伦
伊谢尔伦 2017-04-17 14:30:05
0
1
473

安装完centos7.2后,卸载掉不需要的自带软件,卸载Apache的时候,卸载不了。步骤是这样的:
1、停止httpd服务
# systemctl stop httpd.service //服务并没有启用
2、查看apache包
# rpm -qa|grep httpd //什么都没有
所以改用
# yum list|grep httpd //内容如下

darkhttpd.x86_64                        1.11-1.el7                     epel     
httpd.x86_64                            2.4.6-40.el7.centos            base     
httpd-devel.x86_64                      2.4.6-40.el7.centos            base     
httpd-itk.x86_64                        2.4.7.01-5.el7                 epel     
httpd-manual.noarch                     2.4.6-40.el7.centos            base     
httpd-tools.x86_64                      2.4.6-40.el7.centos            base     
libmicrohttpd.i686                      0.9.33-2.el7                   base     
libmicrohttpd.x86_64                    0.9.33-2.el7                   base     
libmicrohttpd-devel.i686                0.9.33-2.el7                   base     
libmicrohttpd-devel.x86_64              0.9.33-2.el7                   base     
libmicrohttpd-doc.noarch                0.9.33-2.el7                   base     
lighttpd.x86_64                         1.4.39-1.el7                   epel     
lighttpd-fastcgi.x86_64                 1.4.39-1.el7                   epel     
lighttpd-mod_geoip.x86_64               1.4.39-1.el7                   epel     
lighttpd-mod_mysql_vhost.x86_64         1.4.39-1.el7                   epel     
opensips-httpd.x86_64                   1.10.5-3.el7                   epel     
owncloud-httpd.noarch                   8.0.10-1.el7                   epel     
python-sphinxcontrib-httpdomain.noarch  1.4.0-1.el7                    epel     
radicale-httpd.noarch                   1.1.1-1.el7                    epel     
viewvc-httpd-fcgi.noarch                1.1.24-1.el7                   epel     
viewvc-httpd-wsgi.noarch                1.1.24-1.el7                   epel     
web-assets-httpd.noarch                 5-1.el7                        epel     

3、执行删除
# yum erase httpd.x86_64 //执行删除,内容如下

Loaded plugins: langpacks
No Match for argument: httpd.x86_64
No Packages marked for removal

应该怎么办?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
伊谢尔伦

The syntax for deleting a package using yum is as follows (erase is an alias for remove, it is recommended to use remove):

yum remove package_name

Apache’s package_name is httpd, so the correct operation is:

yum remove httpd

In addition, after performing the above operation, yum will automatically delete the Apache dependency

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template