Ad Widget

Collapse

zabbix-agent ubuntu 12.10 cannot install remove or upgrade

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • woland
    Junior Member
    • Aug 2013
    • 2

    #1

    zabbix-agent ubuntu 12.10 cannot install remove or upgrade

    Hi there,
    I am having troubles with the client in ubuntu

    Code:
     sudo apt-get install zabbix-agent
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages will be upgraded:
      zabbix-agent
    1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
    1 not fully installed or removed.
    Need to get 0 B/343 kB of archives.
    After this operation, 9,216 B disk space will be freed.
    Preconfiguring packages ...
    Selecting previously unselected package zabbix-agent.
    (Reading database ... 66307 files and directories currently installed.)
    Preparing to replace zabbix-agent 1:2.0.2+dfsg-3 (using .../zabbix-agent_1%3a2.0.11-1+precise_amd64.deb) ...
    invoke-rc.d: initscript zabbix-agent, action "stop" failed.
    dpkg: warning: subprocess old pre-removal script returned error exit status 1
    dpkg: trying script from the new package instead ...
    invoke-rc.d: initscript zabbix-agent, action "stop" failed.
    dpkg: error processing /var/cache/apt/archives/zabbix-agent_1%3a2.0.11-1+precise_amd64.deb (--unpack):
     subprocess new pre-removal script returned error exit status 1
    invoke-rc.d: initscript zabbix-agent, action "start" failed.
    dpkg: error while cleaning up:
     subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
     /var/cache/apt/archives/zabbix-agent_1%3a2.0.11-1+precise_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello!

    It looks like you are trying to install Zabbix agent without obtaining the latest configuration packages.
    If you want to install the latest Zabbix agent version 2.2.3 then you have to execute the following:

    Code:
    wget http://repo.zabbix.com/zabbix/2.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_2.2-1+precise_all.deb
    sudo dpkg -i zabbix-release_2.2-1+precise_all.deb
    sudo apt-get update
    sudo apt-get install zabbix-agent
    Best Regards,
    Ingus

    Comment

    • woland
      Junior Member
      • Aug 2013
      • 2

      #3
      Thanks for the reply. I have downloaded the newest deb package. That's how it comes up with updates for the client. The problem was one of the scripts in /var/lib/dpkg/info

      Can't quite remember, but I ended up deleting one of the three scripts: zabbix-agent.prerm possibly.

      All good now. Regards

      Comment

      • ebonweaver
        Member
        • Feb 2013
        • 71

        #4
        I'm seeing a similar issue where the agent can not install for some reason.

        Traceback (most recent call last):
        File "/usr/bin/apt-listchanges", line 237, in <module>
        main()
        File "/usr/bin/apt-listchanges", line 48, in main
        debs = apt_listchanges.read_apt_pipeline(config)
        File "/usr/share/apt-listchanges/apt_listchanges.py", line 83, in read_apt_pipeline
        return map(lambda pkg: filenames[pkg], order)
        File "/usr/share/apt-listchanges/apt_listchanges.py", line 83, in <lambda>
        return map(lambda pkg: filenames[pkg], order)
        KeyError: 'zabbix-agent'
        Setting up zabbix-agent (1:2.4.3-1+precise) ...
        * Starting Zabbix agent zabbix_agentd invoke-rc.d: initscript zabbix-agent, action "start" failed.
        dpkg: error processing zabbix-agent (--configure):
        subprocess installed post-installation script returned error exit status 1
        Errors were encountered while processing:
        zabbix-agent
        E: Sub-process /usr/bin/dpkg returned an error code (1)

        Following this post I tried removing the files in /var/lib/dpkg/info for zabbix-agent. That got it to the point it tried to install, but it failed, and now is partially installed. Attempts to finish the install result in:

        Setting up zabbix-agent (1:2.4.4-1+precise) ...
        * Starting Zabbix agent zabbix_agentd invoke-rc.d: initscript zabbix-agent, action "start" failed.
        dpkg: error processing zabbix-agent (--configure):
        subprocess installed post-installation script returned error exit status 1
        Errors were encountered while processing:
        zabbix-agent


        Note that between these attempts it seems to have gone up a version in which package it's trying to install as well, which is odd.
        Is the Ubuntu package broken? How can this best be resolved?

        Comment

        Working...