ฉันได้ติดตั้งnginxโดยใช้apt
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:nginx/stable
sudo apt-get install software-properties-common
sudo apt-get update
sudo apt-get install nginx
จากนั้นฉันใช้whereis nginxและลบไฟล์ทั้งหมดด้วยตนเองโดยใช้rm ตอนนี้ฉันต้องการติดตั้งใหม่nginxแต่มันไม่ทำงานและกลับข้อผิดพลาด:
awk: cannot open /etc/nginx/nginx.conf (No such file or directory)
ฉันสร้าง/etc/nginx/nginx.conf แล้วใช้งานapt-get install nginxติดตั้งอย่างสมบูรณ์ใช้งานไม่ได้
ผลลัพธ์ของsudo dpkg -l | grep nginx:
ii nginx 1.4.3-1~raring0 all small, powerful, scalable web/proxy server
ii nginx-common 1.4.3-1~raring0 all small, powerful, scalable web/proxy server - common files
ii nginx-full 1.4.3-1~raring0 i386 nginx web/proxy server (standard version)
nginxไม่ใช่วิธีที่ถูกต้องในการลบแพ็คเกจใด ๆ ใน Ubuntu คุณต้องการลบโดยใช้apt-getคำสั่งเดียวกัน ให้ฉันโพสต์วิธีที่เหมาะสมเพื่อลบมันอย่างสมบูรณ์และวิธีการติดตั้งอีกครั้ง