如何恢复/etc/nginx? [英] How can I restore /etc/nginx?
本文介绍了如何恢复/etc/nginx?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于错误,我已经在我的ubuntu 11.10 PC中删除了/etc/nginx目录.如何还原/etc/nginx中的ngnix目录?
By mistake I have removed /etc/nginx directory in my ubuntu 11.10 PC. How can I restore the ngnix directory in /etc/nginx ?
我执行了以下命令:
-
sudo su
-
rm -rf /etc/nginx
sudo su
rm -rf /etc/nginx
我想再次获得/etc/nginx目录.怎么样?
I want to get again /etc/nginx directory. how?
我尝试过重新安装nginx:
I tried this to re-install nginx:
-
sudo apt-get update
-
sudo apt-get upgrade
-
sudo apt-get install nginx
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nginx
然后它给出以下内容
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nginx
如何在ubuntu 11.10上获得完整的nginx软件?
How can i get full nginx software on ubuntu 11.10?
推荐答案
要重新创建它,请先使用purge卸载,甚至删除配置文件和记录:
To recreate it, first uninstall using purge to remove even configuration files and records:
sudo apt-get purge nginx nginx-common nginx-full
然后重新安装:
sudo apt-get install nginx
如果以上方法都不适合您,您还可以尝试使用dpkg的--force-confmiss选项.
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
这篇关于如何恢复/etc/nginx?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文