# Macos M1 Ventura 13.0.1 Elastic agent install fail

**URL:** <https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262>\
**Category:** Elastic Security\
**Created:** [November 18, 2022, 4:44am UTC](https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262 "2022-11-18T04:44:20Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![xqaiviwjxzw](https://avatars.discourse-cdn.com/v4/letter/x/bbce88/32.png) [@xqaiviwjxzw](https://discuss.elastic.co/u/xqaiviwjxzw)\
**Post date:** [November 18, 2022, 4:44am UTC](https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262/1 "2022-11-18T04:44:20Z")

</div>

I installed the elastic agent on macos Ventura 13.0.1 using the command line and the installation failed showing：

```auto
panic: getwd: invalid argument

goroutine 1 [running]:

github.com/elastic/elastic-agent/internal/pkg/agent/application/paths.retrieveExecutablePath()

github.com/elastic/elastic-agent/internal/pkg/agent/application/paths/common.go:197 +0x148

github.com/elastic/elastic-agent/internal/pkg/agent/application/paths.initialTop()

github.com/elastic/elastic-agent/internal/pkg/agent/application/paths/common.go:183 +0x20

github.com/elastic/elastic-agent/internal/pkg/agent/application/paths.init.0()

github.com/elastic/elastic-agent/internal/pkg/agent/application/paths/common.go:41 +0x20

```

Command used：  
sudo . /elastic-agent install --url=[https://xx.xx](https://xx.xx) --enrollment-token=xx --insecure --force

What is the solution to this?

---

<div class="post-metadata">

**Author:** ![Lee\_Hinman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lee_hinman/32/74973_2.png) [@Lee\_Hinman](https://discuss.elastic.co/u/Lee_Hinman)\
**Post date:** [November 30, 2022, 12:21am UTC](https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262/2 "2022-11-30T00:21:38Z")

</div>

which version of `elastic-agent` are you trying to install?

Also, just to double check. Are you using the `aarch64` version or the `x86_64` version?

Also does the Terminal application that you are installing from have Full Disk Access? We have seen the install fail on Ventura when it doesn't.

---

<div class="post-metadata">

**Author:** ![xqaiviwjxzw](https://avatars.discourse-cdn.com/v4/letter/x/bbce88/32.png) [@xqaiviwjxzw](https://discuss.elastic.co/u/xqaiviwjxzw)\
**Post date:** [December 13, 2022, 4:07am UTC](https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262/3 "2022-12-13T04:07:24Z")

</div>

The installation package used is the arch64 version.The installation is failing, the option is not yet displayed in the full disk access rights.

---

<div class="post-metadata">

**Author:** ![xqaiviwjxzw](https://avatars.discourse-cdn.com/v4/letter/x/bbce88/32.png) [@xqaiviwjxzw](https://discuss.elastic.co/u/xqaiviwjxzw)\
**Post date:** [December 13, 2022, 4:14am UTC](https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262/4 "2022-12-13T04:14:47Z")

</div>

I have tried to use the installation package of elastic agent 8.5.0 and elastic agent 8.5.3, but the installation failed, what is the solution? Or is this a bug?

---

<div class="post-metadata">

**Author:** ![xqaiviwjxzw](https://avatars.discourse-cdn.com/v4/letter/x/bbce88/32.png) [@xqaiviwjxzw](https://discuss.elastic.co/u/xqaiviwjxzw)\
**Post date:** [December 13, 2022, 6:49am UTC](https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262/5 "2022-12-13T06:49:43Z")

</div>

The first time the installation is performed the error shows：

```auto
Error: failed to fix permissions: chown /Library/Elastic/Agent/data/elastic-agent-xxx/elastic-agent.app: operation not permitted

For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.5/fleet-troubleshooting.html

Error: enroll command failed with exit code: 1

For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.5/fleet-troubleshooting.html

```

open Full Disk Access，Error displayed ：

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/4/b4eb7296ec22068b9578125f804b2c191f8360a7.jpeg)

---

<div class="post-metadata">

**Author:** ![xqaiviwjxzw](https://avatars.discourse-cdn.com/v4/letter/x/bbce88/32.png) [@xqaiviwjxzw](https://discuss.elastic.co/u/xqaiviwjxzw)\
**Post date:** [December 13, 2022, 7:24am UTC](https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262/6 "2022-12-13T07:24:38Z")

</div>

The server side shows：

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/3/b3bbf742bdbbaa517696eeecf6d88e58559c2cf6.png)

---

<div class="post-metadata">

**Author:** ![Krishna\_Teja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_teja/32/104976_2.png) [@Krishna\_Teja](https://discuss.elastic.co/u/Krishna_Teja)\
**Post date:** [December 24, 2022, 4:12am UTC](https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262/7 "2022-12-24T04:12:10Z")

</div>

I'm having the same issue on macOS Ventura.

When trying to install elastic agent on Mac, it fails with `Error: failed to fix permissions: chown /Library/Elastic/Agent/data/elastic-agent-{code}/elastic-agent.app: operation not permitted` error.

Agent is visible on elastic fleet but when searching for elastic files on `/Library/Elastic/`, I see an empty directory. The /Library/Elastic directory is created, but there is no Agent sub-directory.

Fetch agent status via `elastic-agent status` throws `command not found: elastic-agent` error.

Unable to uninstall using `sudo /Library/Elastic/Agent/elastic-agent uninstall` too.

Tried using 2 different machines running Ventura. They have the same problem. Previous OS versions work just fine.

Failing OS details : macOS Ventura 13.0.1

---

<div class="post-metadata">

**Author:** ![Carlos\_Caballero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_caballero/32/115250_2.png) [@Carlos\_Caballero](https://discuss.elastic.co/u/Carlos_Caballero)\
**Post date:** [December 27, 2022, 3:58am UTC](https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262/8 "2022-12-27T03:58:41Z")

</div>

I'm having the same issue on macOS Ventura.

 ![imagen_2022-12-27_135325093](https://us1.discourse-cdn.com/elastic/original/3X/a/a/aa768be1b0d1ade136180089fb06d07802b9d963.jpeg)

![Captura de pantalla 2022-12-27 a las 13.54.36](https://us1.discourse-cdn.com/elastic/original/3X/9/d/9d4ec3377d0b6e4d2ea88b604c55247e38ee763f.png)

 ![Captura de pantalla 2022-12-27 a las 13.57.17](https://us1.discourse-cdn.com/elastic/original/3X/8/2/82027bd80b189480001606853ff12a4055c69c09.png)

---

<div class="post-metadata">

**Author:** ![Carlos\_Caballero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_caballero/32/115250_2.png) [@Carlos\_Caballero](https://discuss.elastic.co/u/Carlos_Caballero)\
**Post date:** [December 27, 2022, 4:33am UTC](https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262/9 "2022-12-27T04:33:13Z")

</div>

solution:

Add full access to the hard disk to the terminal application.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/9/59062535164e2398612ef7e9f0ae42da8ec5646f.jpeg)

---

<div class="post-metadata">

**Author:** ![Krishna\_Teja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_teja/32/104976_2.png) [@Krishna\_Teja](https://discuss.elastic.co/u/Krishna_Teja)\
**Post date:** [December 28, 2022, 5:27pm UTC](https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262/10 "2022-12-28T17:27:57Z")

</div>

Thank you @Carlos_Caballero. This step fixed the issue.

---

<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:** [January 25, 2023, 5:28pm UTC](https://discuss.elastic.co/t/macos-m1-ventura-13-0-1-elastic-agent-install-fail/319262/11 "2023-01-25T17:28:01Z")

</div>

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