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

**URL:** <https://discuss.elastic.co/t/unable-to-upgrade-from-elastic-agent-8-3-3-to-8-4-0-or-install-8-4-0-cleanly/312928>\
**Category:** Elastic Agent\
**Created:** [August 25, 2022, 1:57pm UTC](https://discuss.elastic.co/t/unable-to-upgrade-from-elastic-agent-8-3-3-to-8-4-0-or-install-8-4-0-cleanly/312928 "2022-08-25T13:57:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Curtis\_Ruck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/curtis_ruck/32/110075_2.png) [@Curtis\_Ruck](https://discuss.elastic.co/u/Curtis_Ruck)\
**Post date:** [August 25, 2022, 1:57pm UTC](https://discuss.elastic.co/t/unable-to-upgrade-from-elastic-agent-8-3-3-to-8-4-0-or-install-8-4-0-cleanly/312928/1 "2022-08-25T13:57:22Z")

</div>

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.

```auto
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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 22, 2022, 1:58pm UTC](https://discuss.elastic.co/t/unable-to-upgrade-from-elastic-agent-8-3-3-to-8-4-0-or-install-8-4-0-cleanly/312928/2 "2022-09-22T13:58:07Z")

</div>

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