# Resolving dependencies installing collections

**URL:** <https://forum.ansible.com/t/resolving-dependencies-installing-collections/1277>\
**Category:** Get Help\
**Tags:** galaxy-ng\
**Created:** [October 2, 2023, 2:33pm UTC](https://forum.ansible.com/t/resolving-dependencies-installing-collections/1277 "2023-10-02T14:33:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [October 2, 2023, 2:33pm UTC](https://forum.ansible.com/t/resolving-dependencies-installing-collections/1277/1 "2023-10-02T14:33:15Z")

</div>

I was building a new release of a collection on Saturday with the following in `galaxy.yml`:

```yml
dependencies:
  ansible.utils: '>=2.6.1'

```

That built just fine, but when updating projects that use this new release (`ansible-galaxy collection install -r collections/requirements.yml -p ./collections/ --force-with-deps`), then `ansible-galaxy` complained that it couldn’t resolve the dependency on `ansible.utils`. (Sorry, I don’t have the exact wording.) I fought it for a couple of hours trying different things, and finally worked around the issue by removing the dependency thus:

```yml
dependencies: {}

```

After that, updates of the projects which use the new release of my collection worked.  
Clearly this is not an acceptable work-around. I though it was something I had broken, but seeing the flurry of issues with `galaxy-ng` it’s probably related and should be reported.

Edit: This was all with “ansible [core 2.14.7]”.

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [October 2, 2023, 3:25pm UTC](https://forum.ansible.com/t/resolving-dependencies-installing-collections/1277/2 "2023-10-02T15:25:36Z")

</div>

Our production is toast since the galaxy\_ng switch.

```txt
Starting galaxy collection install process
Process install dependency map
ERROR! Failed to resolve the requested dependencies map. Could not satisfy the following requirements:
* kubernetes.core:2.2.0 (direct request)

```

Edit: Here’s another example from Saturday September 30 around 5:16:21 PM EDT.

```txt
ERROR! Failed to resolve the requested dependencies map. Could not satisfy the following requirements:
* ansible.utils:>=2.6.1 (dependency of mw.cc:1.0.2)

```

This was the one I mentioned in the original post where we had to remove the dependencies in the `galaxy.yml` to get projects to update with it.

---

<div class="post-metadata">

**Author:** ![drodowic](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/drodowic/32/235_2.png) [@drodowic](https://forum.ansible.com/u/drodowic)\
**Post date:** [October 4, 2023, 8:28pm UTC](https://forum.ansible.com/t/resolving-dependencies-installing-collections/1277/3 "2023-10-04T20:28:21Z")

</div>

Hi,

The issue is that the ansible-galaxy client is attempting to retrieve dependency information from /api/v2/ as cached in `~/.ansible/galaxy_cache/api.json`

The cache can be cleared by including `--no-cache` or `--clear-response-cache` in the ansible-galaxy command.

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [October 4, 2023, 8:33pm UTC](https://forum.ansible.com/t/resolving-dependencies-installing-collections/1277/4 "2023-10-04T20:33:29Z")

</div>

Interesting. This was occurring in our AWX instances in GCP. I don’t think I have a way to give additional parameters to those galaxy commands. However, the cache may have cleared by now anyway.

I’ll try adding the dependencies back and see if it starts working again.

Thank you very much!

Edit: Caches must have cleared. All the Right Things are happening now wrt resolving dependencies, both on the CLI and in our AWX instances. Good to have an answer about the cause, too. Much appreciated, @drodowic .

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 3, 2023, 8:33pm UTC](https://forum.ansible.com/t/resolving-dependencies-installing-collections/1277/5 "2023-11-03T20:33:54Z")

</div>

Closed on November 3, 2023, 8:33pm UTC

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