Unable to upgrade from elastic-agent 8.3.3 to 8.4.0, or install 8.4.0 cleanly

On Ubuntu 22.04.1, system had Elastic Agent 8.3.3 installed, doing daily apt upgrade -y and the 8.4.0 upgrade fails. Removing elastic-agent and reinstalling also fails.

It fails during package configuration running elastic-agent --configure. The same error occurs with apt install elastic-agent, apt upgrade elastic-agent, or dpkg --configure elastic-agent.

ruckc@d0034:~$ sudo dpkg --configure elastic-agent
Setting up elastic-agent (8.4.0) ...
dpkg: error processing package elastic-agent (--configure):
 installed elastic-agent package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 elastic-agent

When looking at reasons for failure, the /usr/share/elastic-agent/bin/elastic-agent is a symlink to /usr/share/elastic-agent/elastic-agent-0ffbed/elastic-agent which doesn't exist.

If i manually link /var/lib/elastic-agent/data/elastic-agent-56a002/elastic-agent to /usr/share/elastic-agent/bin/elastic-agent then the install/upgrade/dpkg configure succeeds.

In RPM/DEB installations, i highly discourage putting each installation in a separate directory with symlinks into them. It creates error cases like this time and time again. There is really no need when the OS package managers handle the upgrade process for you.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.