Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  2. ZBX-23250

File conflict in debian packages when upgrading zabbix-agent2


    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 7.0 (plan)
    • 6.0.20
    • Packages (C)
    • Debian 10 amd64
    • Sprint 103 (Aug 2023)
    • 1

      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


      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:
      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:
      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

      flawless upgrade

            yurii Jurijs Klopovskis
            sandro1976 Sandro Bordacchini
            Team D
            0 Vote for this issue
            3 Start watching this issue