Debian4 Delete nginx

Source: Internet
Author: User
Debian4: delete nginx-Debian information in the Linux release. For more information, see the following section. Source: www.hilinux.com

It is about to try to compile nginx 0.5.3, then install deb of nginx 0.52, and finally conflict with 0.4 in the apt-get install source, now, an error is reported when everything is installed (Sub-process/usr/bin/dpkg returned an error code (1), and nginx cannot be uninstalled or reinstalled.

$ Sudo apt-get dist-upgrade

The error message is as follows:

Reading the package list... Complete
Analyzing the dependency tree of the software package
Read status information... Complete
Planning upgrade... Complete
A total of 0 software packages have been upgraded, and 0 software packages have been newly installed. 0 software packages need to be uninstalled, and 0 software have not been upgraded.
One software package is not fully installed or uninstalled.
Download the 0B/187kB software package.
After decompression, extra space of 0 B is consumed.
Do you want to continue? [Y/n]
(Reading database... The system currently has a total of 146002 files and directories installed .)
Preparing to replace nginx 0.4.13-2 (Use... Nginx_0.4.13-2_i386.deb )...
Stopping nginx: invoke-rc.d: initscript. nginx, action "stop" failed.
Dpkg: Warning-Error 1 is returned when the original pre-removal script exits.
Dpkg-Now try the script in the new software package...
Stopping nginx: invoke-rc.d: initscript. nginx, action "stop" failed.
Dpkg: Processing/var/cache/apt/archives/nginx_0.4.13-2_i386.deb (? Unpack) error:
Sub-process · New pre-removal script · error code returned · 1
Starting nginx: 2007/08/31 08:37:07 [emerg] 9719 #0: open () "/etc/nginx. conf" failed (2: No such file or directory)
Invoke-rc.d: initscript. nginx, action "start" failed.
Dpkg: An error occurred during the following cleanup operations:
Sub-process · post-installation script · error code returned · 1

An error occurred during processing:
/Var/cache/apt/archives/nginx_0.4.13-2_i386.deb
E: Sub-process/usr/bin/dpkg returned an error code (1)

The method is as follows:

Sudo rm-rf/etc/nginx/
Sudo rm-rf/usr/sbin/nginx
Sudo rm/usr/share/man/man1/nginx.1.gz
Sudo apt-get remove nginx *
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.