Applicable to:
- Plesk for Linux
Symptoms
-
ModSecurity update/installation on Ubuntu server failed with following errors in
/tmp/autoinstaller3.log
:CONFIG_TEXT: dpkg: error processing archive /var/cache/apt/archives/libapache2-modsecurity_2.9.2-ubuntu16.04.18021217_amd64.deb (--unpack):
trying to overwrite '/usr/bin/mlogc', which is also in package libapache2-mod-security2 2.9.2-1+ubuntu16.04.1+deb.sury.org+2
dpkg-deb (subprocess): decompressing archive member: lzma write error: Broken pipe
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg-deb (subprocess): cannot copy archive member from '/var/cache/apt/archives/libapache2-modsecurity_2.9.2-ubuntu16.04.18021217_amd64.deb' to decompressor pipe: failed to write (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libapache2-modsecurity_2.9.2-ubuntu16.04.18021217_amd64.debOR
CONFIG_TEXT: ...
libapache2-modsecurity-plesk :
Conflicts: libapache2-modsecurity modsecurity-crs : Depends:
libapache2-mod-security2 (>= 2.8.0)
... -
The package
libapache2-mod-security2
was installed from a 3rd party repository:# apt-cache policy libapache2-mod-security2
...
500 http://ppa.launchpad.net/ondrej/apache2/ubuntu xenial/main amd64 Packages
...
Cause
Conflict with package libapache2-mod-security2
installed from a 3rd party repository.
Resolution
-
Log in to the server using SSH.
-
Disable a 3rd party repository:
# mv /etc/apt/sources.list.d/ondrej-ubuntu-apache2-xenial.list /etc/apt/sources.list.d/ondrej-ubuntu-apache2-xenial.back
Note: configured 3rd party repository filename may vary.
-
Remove the old package:
# dpkg --remove libapache2-mod-security2
-
Install or upgrade modsecurity using Plesk installer.
Comments
4 comments
Got fallowing error here
mv /etc/apt/sources.list.d/ondrej-ubuntu-apache2-xenial.list /etc/apt/sources.list.d/ondrej-ubuntu-apache2-xenial.back
mv: cannot stat ‘/etc/apt/sources.list.d/ondrej-ubuntu-apache2-xenial.list’: No such file or directory
I have got only kcare.list, plesk.list, plesk-ext-docker.list, plesk-ext-nodejs.list, plesk-migrator.list
Which of these I have to disable?
Also apt-cache returned:
500 http://ftp.debian.org/debian/ jessie/main amd64 Packages
Have a similar issue on a Ubuntu 16.04 Host with latest Plesk 17.8.11 Update 67:
root@IDofMACHINE:~# apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && apt autoclean
Hit:1 http://autoinstall.plesk.com/ubuntu/PSA_17.8.11 xenial InRelease
Hit:2 http://autoinstall.plesk.com/debian/SITEBUILDER_17.8.12 all InRelease
Hit:3 http://autoinstall.plesk.com/ubuntu/PMM_0.1.10 xenial InRelease
Hit:4 http://autoinstall.plesk.com/ubuntu/PHP52_17 xenial InRelease
Hit:5 http://autoinstall.plesk.com/ubuntu/PHP53_17 xenial InRelease
Hit:6 http://autoinstall.plesk.com/ubuntu/PHP54_17 xenial InRelease
Hit:7 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:8 http://autoinstall.plesk.com/ubuntu/PHP55_17 xenial InRelease
Hit:9 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:10 http://autoinstall.plesk.com/ubuntu/PHP56_17 xenial InRelease
Hit:11 http://autoinstall.plesk.com/ubuntu/PHP70_17 xenial InRelease
Hit:12 http://autoinstall.plesk.com/PHP71_17 xenial InRelease
Hit:13 http://autoinstall.plesk.com/PHP72_17 xenial InRelease
Hit:14 http://autoinstall.plesk.com/PHP73_17 xenial InRelease
Hit:15 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:16 http://archive.canonical.com/ubuntu xenial InRelease
Hit:17 https://updates.atomicorp.com/channels/tortix-common/debian xenial InRelease
Reading package lists... Done
N: Ignoring file 'plesk.list.ai_back' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
aum : Depends: libapache2-mod-security2 but it is not installed
modsecurity-crs : Depends: libapache2-mod-security2 (>= 2.8.0) but it is not installed
N: Ignoring file 'plesk.list.ai_back' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
E: Unmet dependencies. Try using -f.
root@IDofMACHINE:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libapache2-mod-security2
The following NEW packages will be installed:
libapache2-mod-security2
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
6 not fully installed or removed.
Need to get 0 B/314 kB of archives.
After this operation, 1230 kB of additional disk space will be used.
Do you want to continue? [Y/n]
N: Ignoring file 'plesk.list.ai_back' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Selecting previously unselected package libapache2-mod-security2.
(Reading database ... 88402 files and directories currently installed.)
Preparing to unpack .../libapache2-mod-security2_2.9.0-1_amd64.deb ...
Unpacking libapache2-mod-security2 (2.9.0-1) ...
dpkg: error processing archive /var/cache/apt/archives/libapache2-mod-security2_2.9.0-1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/apache2/modules/mod_security2.so', which is also in package libapache2-modsecurity 2.9.2-ubuntu16.04.18021217
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libapache2-mod-security2_2.9.0-1_amd64.deb
N: Ignoring file 'plesk.list.ai_back' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
E: Sub-process /usr/bin/dpkg returned an error code (1)
There is and was no 3rd party repo installed.
Any advice to fix this similar issue?
See also: https://talk.plesk.com/threads/plesk-update-dependics.353386/
Hello @Deniss Korsakovs,
Thank you for your question.
As I may see none of the provided lists may affect the update/installation of ModSecurity.
There is a high probability that the issue from the following article was met: Atomic rule set installation/update fails on /usr/lib/apache2/modules/mod_security2.so
Hello @Ralf Göldner,
Thank you for your question.
Such error can be seen due to the Plesk bug with ID PPPM-11003.
Please check the workaround from the following article: Atomic rule set installation/update fails on /usr/lib/apache2/modules/mod_security2.so
Please sign in to leave a comment.