当前位置:   article > 正文

Ubuntu 环境下,卸载Nginx后重装失败的处理方法_sudo apt-get purge nginx不好使

sudo apt-get purge nginx不好使

本身安装的时候,我是用 sudo apt-get -y install nginx 安装的

后来卸载的时候我就简单的使用了sudo apt-get remove nginx

之后就碰到了再安装即使提示安装成功,也找不到路径文件的问题


随后按照其他筒子的经验

实验如下

[python] view plain copy
print ? 在CODE上查看代码片 派生到我的代码片
  1. sudo apt-get –purge remove nginx  
  2. sudo apt-get install nginx  
sudo apt-get --purge remove nginx
sudo apt-get install nginx
  • 1

然后并没有什么卵用


接着再试如下

[python] view plain copy
print ? 在CODE上查看代码片 派生到我的代码片
  1. sudo apt-get –purge remove nginx  
  2. sudo apt-get autoremove  
  3. sudo apt-get install nginx  
sudo apt-get --purge remove nginx
sudo apt-get autoremove
sudo apt-get install nginx
  • 1
  • 2
  • 3

有作用了,有了/etc/nginx文件夹,但是配置文件只有2个




然后再删除一遍

[python] view plain copy
print ? 在CODE上查看代码片 派生到我的代码片
  1. sudo apt-get –purge remove nginx  
  2. sudo apt-get autoremove  
  3. dpkg –get- selections|grep nginx  
sudo apt-get --purge remove nginx
sudo apt-get autoremove
dpkg --get- selections|grep nginx
  • 1
  • 2

并找到和nginx有关系的软件文件


接着删除这个文件,并重装

[python] view plain copy
print ? 在CODE上查看代码片 派生到我的代码片
  1. sudo apt-get –purge remove nginx-common  
  2. sudo apt-get install nginx  
sudo apt-get --purge remove nginx-common
sudo apt-get install nginx
  • 1
  • 2


然后就恢复原样了




这里参考了其他筒子的文章

http://www.2cto.com/os/201506/404306.html




声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/码创造者/article/detail/947688
推荐阅读
相关标签
  

闽ICP备14008679号