Ad Widget

Collapse

Cannot install zabbix-agent on Ubuntu 24.04

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dunnsland
    Member
    • Dec 2021
    • 81

    #1

    Cannot install zabbix-agent on Ubuntu 24.04

    I just upgraded my VM from 22.04 to 24.04 without much a do. The issue that I am facing is that I cannot install the zabbix-agent onto the server.
    I checked the version on my zabbix server,
    zabbix_server (Zabbix) 6.0.38
    zabbix_agentd (daemon) (Zabbix) 6.0.38

    on my virtual machine ipbackup, I upgraded the ubuntu version from 22.04 to 24.04
    After the upgrade I needed to upgrade the zabbix-agent. No matter what I tried I could not carry out the upgrade. So I removed the zabbix-agent 5.0
    I first tried to install zabbix-agent.

    root@ipbackup:~# apt install zabbix-agent
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    zabbix-agent is already the newest version (1:6.0.38-1+ubuntu16.04).
    You might want to run 'apt --fix-broken install' to correct these.
    The following packages have unmet dependencies:
    zabbix-agent : Depends: libcurl3 (>= 7.16.2) but it is not installable
    Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable
    Depends: libmodbus5 (>= 3.0.2) but it is not going to be installed
    Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
    E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

    root@ipbackup:~# apt --fix-broken install
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Correcting dependencies... Done
    The following packages will be REMOVED:
    zabbix-agent
    0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
    1 not fully installed or removed.
    After this operation, 691 kB disk space will be freed.
    Do you want to continue? [Y/n]
    (Reading database ... 182621 files and directories currently installed.)
    Removing zabbix-agent (1:6.0.38-1+ubuntu16.04) ...
    Processing triggers for man-db (2.12.0-4build2) ...
    need restart is being skipped since dpkg has failed

    I assumed that the zabbix-agent had been removed so I thought that I would try to install it again.

    root@ipbackup:~# apt install zabbix-agent
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Package zabbix-agent is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package 'zabbix-agent' has no installation candidate

    When this failed I thought that I would try to install it from the downloaded file.

    root@ipbackup:~# dpkg -i zabbix-agent_6.0.38-1+ubuntu16.04_amd64.deb
    Selecting previously unselected package zabbix-agent.
    (Reading database ... 182612 files and directories currently installed.)
    Preparing to unpack zabbix-agent_6.0.38-1+ubuntu16.04_amd64.deb ...
    Unpacking zabbix-agent (1:6.0.38-1+ubuntu16.04) ...
    dpkg: dependency problems prevent configuration of zabbix-agent:
    zabbix-agent depends on libcurl3 (>= 7.16.2); however:
    Package libcurl3 is not installed.
    zabbix-agent depends on libldap-2.4-2 (>= 2.4.7); however:
    Package libldap-2.4-2 is not installed.
    zabbix-agent depends on libmodbus5 (>= 3.0.2); however:
    Package libmodbus5 is not installed.
    zabbix-agent depends on libssl1.0.0 (>= 1.0.1); however:
    Package libssl1.0.0 is not installed.

    dpkg: error processing package zabbix-agent (--install):
    dependency problems - leaving unconfigured
    Processing triggers for man-db (2.12.0-4build2) ...
    Errors were encountered while processing:
    zabbix-agent

    I have searched everywhere and I cannot figure out what to do next. I have tried to install the missing dependencies, but these show as already installed.

    Please Help.
    Thanks
    Lawrence
  • Answer selected by dunnsland at 19-02-2025, 13:18.
    ajmjoha
    Junior Member
    • Feb 2025
    • 1

    Okay got it , you're trying to install Zabbix Agent 6.0.38, but you downloaded the package for Ubuntu 16.04 (zabbix-agent_6.0.38-1+ubuntu16.04_amd64.deb). Since you've upgraded to Ubuntu 24.04, you need to install a compatible version of the Zabbix Agent for your current OS.
    First you need to remove the zabbix agent (incorrect) from you current os, to do that , please use this commands

    sudo apt remove --purge zabbix-agent
    sudo apt autoremove


    Then you need to be sure that your ubuntu package manager is clean and ready.

    sudo apt --fix-broken install
    sudo apt update


    Check you repository If there’s an old Zabbix repository file, remove it:
    sudo rm /etc/apt/sources.list.d/zabbix.list​

    Then download and install the right repository
    wget https://repo.zabbix.com/zabbix/6.0/u...u24.04_all.deb
    sudo dpkg -i zabbix-release_6.0-4+ubuntu24.04_all.deb
    sudo apt update


    Install the zabbix-agent
    sudo apt install zabbix-agent

    Comment

    • ajmjoha
      Junior Member
      • Feb 2025
      • 1

      #2
      Okay got it , you're trying to install Zabbix Agent 6.0.38, but you downloaded the package for Ubuntu 16.04 (zabbix-agent_6.0.38-1+ubuntu16.04_amd64.deb). Since you've upgraded to Ubuntu 24.04, you need to install a compatible version of the Zabbix Agent for your current OS.
      First you need to remove the zabbix agent (incorrect) from you current os, to do that , please use this commands

      sudo apt remove --purge zabbix-agent
      sudo apt autoremove


      Then you need to be sure that your ubuntu package manager is clean and ready.

      sudo apt --fix-broken install
      sudo apt update


      Check you repository If there’s an old Zabbix repository file, remove it:
      sudo rm /etc/apt/sources.list.d/zabbix.list​

      Then download and install the right repository
      wget https://repo.zabbix.com/zabbix/6.0/u...u24.04_all.deb
      sudo dpkg -i zabbix-release_6.0-4+ubuntu24.04_all.deb
      sudo apt update


      Install the zabbix-agent
      sudo apt install zabbix-agent

      Comment

      • moooola
        Junior Member
        • Jul 2024
        • 29

        #3
        Hello

        It looks like the repository is still out of date. [6.0.38-1+ubuntu16.04]

        If you update to the repository for Ubuntu24.04/Zabbix6.0LTS, I think you will be able to make the necessary updates.

        -----
        As a supplement, here is an example of a mistake I made.

        When you run dpkg -i zabbix-release_latest_6.0+ubuntu24.04_all.deb,
        you are asked whether you want to use the version provided by the package maintainer or keep the current version. I accidentally answered "N" and had a hard time recovering.
        Last edited by moooola; 19-02-2025, 08:55.

        Comment

        • dunnsland
          Member
          • Dec 2021
          • 81

          #4
          ajmjoha thank you for responding, this did not work the first time I tried, but after persevering a little I managed to get it resolved

          Comment

          Working...