> For the complete documentation index, see [llms.txt](https://docs.openiam.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openiam.com/troubleshooting/deployment/failed-dependencies.md).

# Failed dependencies

The failed-dependencies error when installing the OpenIAM RPM, why the documented install command does not produce it, and what to do when yum cannot reach its repositories.

| Symptom                                                         | Likely cause                                                                 | Resolution                                                                             |
| --------------------------------------------------------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `error: Failed dependencies: tar is needed by openiam-…`        | The package was installed with `rpm -i`, which does not resolve dependencies | Use `yum install`, below                                                               |
| `Failed to download metadata for repo …`, status 404            | The host's repositories are unreachable or misconfigured                     | [Point the repository somewhere that answers](#when-yum-cannot-reach-its-repositories) |
| A dependency will not install even though the repositories work | A stray repository file is breaking the transaction                          | [Remove the extra repository](#a-stray-repository-file)                                |

## Install with yum, not rpm

The error below comes from `rpm -i`, which installs exactly the package you name and fails if anything it needs is absent:

```
[root@host ~]# sudo rpm -i openiam-$OPENIAM_VERSION.noarch.x86_64.rpm
error: Failed dependencies:
        tar is needed by openiam-4.2.1.10-2608.noarch.x86_64
```

{% hint style="info" %}
**This is why** [**Install OpenIAM**](/installation/rpm/rpm-single-node/install.md) **uses `yum install` rather than `rpm -i`.** `yum` resolves dependencies and pulls `tar` in by itself, so following the installation guide does not produce this error at all.
{% endhint %}

{% code overflow="wrap" %}

```bash
yum install -y "./openiam-$OPENIAM_VERSION.noarch.x86_64.rpm"
```

{% endcode %}

If that works, you are done. The rest of this page is for a host where `yum` itself cannot fetch anything.

## When yum cannot reach its repositories

Installing the dependency on its own then fails on metadata rather than on the package:

{% code overflow="wrap" %}

```
[root@host ~]# sudo yum install tar
Errors during downloading metadata for repository 'appstream': - Status code: 404 for http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/repodata/repomd.xml
Error: Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
```

{% endcode %}

{% hint style="warning" %}
**Check first whether you are supposed to be reaching the internet at all.** OpenIAM ships its own dependency repository, `openiamrepo.tar.gz`, matched to the host's Enterprise Linux major version — see [Obtain the software](/installation/obtain-the-software.md). On an air-gapped installation, a 404 against a public mirror means the host is using the wrong repository, not that the mirror is at fault. The usual cause is a dependency repository that does not match the host's `PLATFORM_ID`.
{% endhint %}

Where the host is meant to reach a public mirror and the mirror is genuinely gone — an Enterprise Linux release past end of support no longer has one — point the repository at an archive instead. Comment out `mirrorlist`, uncomment `baseurl`, and give it a host that still answers:

{% code overflow="wrap" %}

```
[appstream]
name=CentOS Stream 8 - AppStream
#mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=AppStream&infra=$infra
#baseurl=http://mirror.centos.org/8-stream/AppStream/x86_64/os/
baseurl=http://vault.centos.org/8-stream/AppStream/x86_64/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
```

{% endcode %}

The same edit applies to the other repository files the host has — `BaseOS` and `Extras` alongside `AppStream` in the example above.

{% hint style="info" %}
**The example is a release that is already out of support**, which is why its mirror returns 404. The supported platform is Enterprise Linux 9 or 10 — RHEL, Rocky or AlmaLinux. If this is what you are hitting, the archive is a way to finish the installation, not a state to stay in.
{% endhint %}

## A stray repository file

With the repositories reachable, a dependency can still refuse to install because an unrelated repository file in `/etc/yum.repos.d` is failing the transaction. In the case this page was written from it was `Extras-common.repo`.

{% code overflow="wrap" %}

```
[root@host ~]# ll /etc/yum.repos.d
total 48
-rw-r--r--. 1 root root  953 Jun  3 07:45 CentOS-Stream-AppStream.repo
-rw-r--r--. 1 root root  942 Jun  3 07:44 CentOS-Stream-BaseOS.repo
-rw-r--r--. 1 root root  316 Mar 28  2022 CentOS-Stream-Debuginfo.repo
-rw-r--r--. 1 root root  744 Mar 28  2022 CentOS-Stream-Extras-common.repo
-rw-r--r--. 1 root root  943 Jun  3 07:46 CentOS-Stream-Extras.repo
-rw-r--r--. 1 root root  734 Mar 28  2022 CentOS-Stream-HighAvailability.repo
-rw-r--r--. 1 root root  696 Mar 28  2022 CentOS-Stream-Media.repo
-rw-r--r--. 1 root root  683 Mar 28  2022 CentOS-Stream-NFV.repo
-rw-r--r--. 1 root root  782 Jun  3 07:48 CentOS-Stream-PowerTools.repo
-rw-r--r--. 1 root root  690 Mar 28  2022 CentOS-Stream-RealTime.repo
-rw-r--r--. 1 root root  748 Mar 28  2022 CentOS-Stream-ResilientStorage.repo
-rw-r--r--. 1 root root 1771 Mar 28  2022 CentOS-Stream-Sources.repo
```

{% endcode %}

`CentOS-Stream-Extras-common.repo` is the extra one — every other file in that listing is a stock CentOS Stream repository, and `Extras` already has its own.

Remove it, install the dependency, and carry on with [Install OpenIAM](/installation/rpm/rpm-single-node/install.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openiam.com/troubleshooting/deployment/failed-dependencies.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
