Symptoms
-
Debian or Ubuntu is installed on the server
-
Unable to install a package in Tools & Settings > Updates & Upgrades or Plesk Update/Upgrade fails. The following error is produced:
PLESK_ERROR: E: Sub-process /usr/bin/dpkg returned an error code (1)
-
The following can be found in the
/var/log/plesk/install/autoinstaller3.log
:Unpacking sw-nginx (1.11.10-debian8.0.17040416) ...
dpkg: error processing archive /var/cache/apt/archives/sw-nginx_1.11.10-debian8.0.17040416_amd64.deb (--unpack):
trying to overwrite '/usr/share/man/man1/nginx.1.gz', which is also in package nginx-common 1.6.2-5+deb8u4
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
/var/cache/apt/archives/sw-nginx_1.11.10-debian8.0.17040416_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1) -
The following error can be found in the
/var/log/plesk/panel.log
file:ERR [panel] Task failed: id=190, pid=24296, type=pum-update-packages, error=2017-11-25 02:31:12 INFO: pum is called with arguments: ['--update', '--json', '--', 'sw-nginx']
INFO: updating packages: sw-nginx
E:Sub-process /usr/bin/dpkg returned an error code (1)
ERROR: installArchives() failed
ERROR: Exited with returncode 1. -
Dist-upgrade script from Ubuntu 14 to Ubuntu 16 may fail with:
# /opt/psa/bin/distupgrade.helper.ubt14-ubt16.x64.sh
dpkg: error processing archive /var/cache/apt/archives/hiera_2.0.0-2_all.deb (–unpack):
trying to overwrite ‘/usr/share/man/man1/hiera.1.gz’, which is also in package ruby-hiera 1.3.0-1
Processing triggers for man-db (2.7.5-1) …
Errors were encountered while processing:
/var/cache/apt/archives/hiera_2.0.0-2_all.deb
W: No sandbox user ‘_apt’ on the system, can not drop privileges
E: Sub-process /usr/bin/dpkg returned an error code (1)
Cause
Package from the Plesk repository conflicts with the package which was installed from the OS repository.
Resolution
Note: This article may require additional administrative knowledge to apply. If any help required, contact server’s administrator or hosting support.
-
Connect to the server via SSH
-
Review the error Plesk installation failed with
Note: In the examples above packages
nginx-common
andruby-hiera
provided. -
Remove the conflicting packages mentioned in the errors:
# apt-get remove sw-nginx nginx-common
# apt-get remove hiera ruby-hiera
Note: if it is not possible to remove package due to some dependencies, use the following command:
# dpkg –remove –force-depends libapache2-modsecurity
-
Install the package/finish the upgrade from the Plesk interface in Tools & Settings > Updates & Upgrades or using the Plesk Installer