[ZBX-23250] File conflict in debian packages when upgrading zabbix-agent2 Created: 2023 Aug 11  Updated: 2024 Apr 10  Resolved: 2023 Aug 17

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Packages (C)
Affects Version/s: 6.0.20
Fix Version/s: 7.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Sandro Bordacchini Assignee: Jurijs Klopovskis
Resolution: Fixed Votes: 0
Labels: agent
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian 10 amd64


Team: Team D
Sprint: Sprint 103 (Aug 2023)
Story Points: 1

 Description   

Steps to reproduce:

  1. upgrade zabbix-agent2 with apt install zabbix-agent2 (versions 1:6.0.20-1+debian10 over 1:6.0.5-1+debian10

then it happens:

  1. deps resolving pulls in also zabbix-agent2-plugin-mongodb_0%3a6.0.20-1+debian10_amd64.deb (even if mongodb not installed on this server)
  2. mongodb has the /etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf that was previously in zabbix-agent2
  3. file conflict arises

Result:

root@postgres01:~# apt install zabbix-agent2 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  zabbix-agent2-plugin-mongodb zabbix-agent2-plugin-postgresql
The following NEW packages will be installed:
  zabbix-agent2-plugin-mongodb zabbix-agent2-plugin-postgresql
The following packages will be upgraded:
  zabbix-agent2
1 upgraded, 2 newly installed, 0 to remove and 132 not upgraded.
Need to get 10.2 MB of archives.
After this operation, 16.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 https://repo.zabbix.com/zabbix/6.0/debian buster/main amd64 zabbix-agent2-plugin-mongodb amd64 0:6.0.20-1+debian10 [3,079 kB]
Get:2 https://repo.zabbix.com/zabbix/6.0/debian buster/main amd64 zabbix-agent2-plugin-postgresql amd64 0:6.0.20-1+debian10 [2,485 kB]
Get:3 https://repo.zabbix.com/zabbix/6.0/debian buster/main amd64 zabbix-agent2 amd64 1:6.0.20-1+debian10 [4,644 kB]
Fetched 10.2 MB in 2s (4,392 kB/s)       
Selecting previously unselected package zabbix-agent2-plugin-mongodb.
(Reading database ... 41556 files and directories currently installed.)
Preparing to unpack .../zabbix-agent2-plugin-mongodb_0%3a6.0.20-1+debian10_amd64.deb ...
Unpacking zabbix-agent2-plugin-mongodb (6.0.20-1+debian10) ...
dpkg: error processing archive /var/cache/apt/archives/zabbix-agent2-plugin-mongodb_0%3a6.0.20-1+debian10_amd64.deb (--unpack):
 trying to overwrite '/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf', which is also in package zabbix-agent2 1:6.0.5-1+debian10
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Selecting previously unselected package zabbix-agent2-plugin-postgresql.
Preparing to unpack .../zabbix-agent2-plugin-postgresql_0%3a6.0.20-1+debian10_amd64.deb ...
Unpacking zabbix-agent2-plugin-postgresql (6.0.20-1+debian10) ...
Preparing to unpack .../zabbix-agent2_1%3a6.0.20-1+debian10_amd64.deb ...
Unpacking zabbix-agent2 (1:6.0.20-1+debian10) over (1:6.0.5-1+debian10) ...
Errors were encountered while processing:
 /var/cache/apt/archives/zabbix-agent2-plugin-mongodb_0%3a6.0.20-1+debian10_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is the current situation:

root@postgres01:~# dpkg -C
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 zabbix-agent2        Zabbix network monitoring solution - agent
 zabbix-agent2-plugin-postgresql Zabbix Agent2 plugin for monitoring PostgreSQLThe following packages have been triggered, but the trigger processing
has not yet been done.  Trigger processing can be requested using
dselect or dpkg --configure --pending (or dpkg --triggers-only):
 man-db               on-line manual pager
 systemd              system and service manager

Expected:
flawless upgrade



 Comments   
Comment by Arturs Dancis [ 2023 Aug 16 ]

Thank you for reporting! Documentation updated:

  • Installation > Known issues (6.0, 6.4, 7.0)
  • Installation > Upgrade procedure > Upgrade from packages > Red Hat Enterprise Linux (6.0, 6.4, 7.0)
  • Installation > Upgrade procedure > Upgrade from packages > Debian/Ubuntu (6.0, 6.4, 7.0)
Generated at Fri Jul 25 06:11:23 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.