I rent a VPS from OVH without Plesk License but they installed Plesk anyway against my consent. This lead to a lot of problems. I had an hard time for everything, installing the last version of Python 3, have the right version of mod_wsgi
or upgrade to Debian Buster...
Now, I want to migrate from Apache to Nginx and it's a mess. I tought first I had to install Nginx myself but because of Plesk, it was already installed. I d'like to remove it but my apt
command is stuck in a kind of inter-dependency problem hard to solve.
When I do:
apt-get remove nginx
Result:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libnginx-mod-http-auth-pam : Depends: nginx-common (= 1.14.2-2+deb10u1) but it is not going to be installed
libnginx-mod-http-dav-ext : Depends: nginx-common (= 1.14.2-2+deb10u1) but it is not going to be installed
libnginx-mod-http-echo : Depends: nginx-common (= 1.14.2-2+deb10u1) but it is not going to be installed
libnginx-mod-http-geoip : Depends: nginx-common (= 1.14.2-2+deb10u1) but it is not going to be installed
libnginx-mod-http-image-filter : Depends: nginx-common (= 1.14.2-2+deb10u1) but it is not going to be installed
libnginx-mod-http-subs-filter : Depends: nginx-common (= 1.14.2-2+deb10u1) but it is not going to be installed
libnginx-mod-http-upstream-fair : Depends: nginx-common (= 1.14.2-2+deb10u1) but it is not going to be installed
libnginx-mod-http-xslt-filter : Depends: nginx-common (= 1.14.2-2+deb10u1) but it is not going to be installed
libnginx-mod-mail : Depends: nginx-common (= 1.14.2-2+deb10u1) but it is not going to be installed
libnginx-mod-stream : Depends: nginx-common (= 1.14.2-2+deb10u1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
If I Try
apt --fix-broken install
Result:
...
Preparing to unpack .../nginx-common_1.14.2-2+deb10u1_all.deb ...
Unpacking nginx-common (1.14.2-2+deb10u1) ...
dpkg: error processing archive /var/cache/apt/archives/nginx-common_1.14.2-2+deb10u1_all.deb (--unpack):
trying to overwrite '/etc/default/nginx', which is also in package sw-nginx 1.16.1.3-debian8.0.19111813
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../nginx-full_1.14.2-2+deb10u1_amd64.deb ...
Unpacking nginx-full (1.14.2-2+deb10u1) ...
dpkg: error processing archive /var/cache/apt/archives/nginx-full_1.14.2-2+deb10u1_amd64.deb (--unpack):
trying to overwrite '/usr/sbin/nginx', which is also in package sw-nginx 1.16.1.3-debian8.0.19111813
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
...
Same result with sudo apt-get install -f nginx-common nginx-full
Note that:
ls /etc/default/nginx
ls: cannot access '/etc/default/nginx': No such file or directory
Because I moved it, so there is nothing to overwrite :/
I tried to remove those package with the following command:
sudo apt-get remove libnginx* --purge
It gives:
Package 'libnginx-mod-http-cache-purge' is not installed, so not removed
Package 'libnginx-mod-http-fancyindex' is not installed, so not removed
Package 'libnginx-mod-http-headers-more-filter' is not installed, so not removed
Package 'libnginx-mod-http-lua' is not installed, so not removed
Package 'libnginx-mod-http-ndk' is not installed, so not removed
Package 'libnginx-mod-http-perl' is not installed, so not removed
Package 'libnginx-mod-http-uploadprogress' is not installed, so not removed
Package 'libnginx-mod-nchan' is not installed, so not removed
Package 'libnginx-mod-rtmp' is not installed, so not removed
sudo apt-get autoremove nginx
gives the same result. I'm really stuck with that.
dpkg -l | grep "libnginx-mod-http-cache-purge"
doesn't return anything.
If I do a search in /var/lib/dpkg/status
I can"t find thoses Package as well.
I also run:
dpkg --configure -a
but it leads in those type of errors:
...
dpkg: error processing package libnginx-mod-http-echo (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnginx-mod-http-subs-filter:
libnginx-mod-http-subs-filter depends on nginx-common (= 1.14.2-2+deb10u1); however:
Package nginx-common is not installed
...
I want a clean installation of Nginx, the one I've is broken and I would like to be able to update it when I want easily. What can I do ?