标签:
由于本人把自己服务器的nginx 给玩坏了,不得已选择卸载重新安装,(先让我哭一会)
然后我把/usr/sbin/nginx 和/etc/nginx 和/usr/share/nginx 和 /usr/share/man/man1/nginx.1.gz的文件夹给删了
然后去重新装 执行这个命令:apt-get install nginx
发现老是报:
nginx is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
大概意思就是nginx已经存在还是没有删除掉。可能存在了一些配置什么东西的,反正我们是没有把nginx删干净
然后我又去网上找了好多资料,他们大多数都是说 把那几个文件夹删了 就可以,
然而对于我来说 并没有卵用。好吧!继续在网上早解决的办法,找到一个我试一个。然后就找到下面的方法了:
To recreate it, first uninstall using purge to remove even configuration files and records:
apt-get purge nginx nginx-common nginx-full
then reinstall:
apt-get install nginx
if above doesn‘t work for you
You can also try using --force-confmiss option of dpkg.
sudo dpkg --force-confmiss -i /var/cache/apt/archives/nginx-common_*.deb
标签:
原文地址:http://www.cnblogs.com/qcwblog/p/5725210.html