Failed dependencies

When installing OpenIAM with the common command of sudo rpm -i openiam-4.2.X.noarch.x86_64.rpm the below error message may be displayed.

[root@dyson ~]# sudo rpm -i openiam-4.2.X.noarch.x86_64.rpm
error: Failed dependencies:
tar is needed by openiam-4.2.1.10-2608.noarch.x86_64

You can try to rectify this error with the following command.

sudo yum install tar

However, it may start giving different errors as shown below.

[root@dyson ~]# sudo yum install tar
CentOS Stream 8 8 - AppStream 21 kB/s | 7.9 kB 00:00 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 (IP: 162.251.108.7) Error: Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Tackling this error might be done with the following.

[root@dyson ~]# sudo yum update -y
CentOS Stream 8 - AppStream 31 B/s | 38 B 00:01
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

Here, the problem might be in the wrong URL for downloading CentOS Stream. Making changes in the AppStream repo file by uncommenting the BaseURL and replacing the mirror link (http://mirror.centos.org) with the vault (http://vault.centos.org) and commenting the mirrorlist line, as follows.

[root@dyson ~]# sudo vi /etc/yum.repos.d/CentOS-Stream-AppStream.repo
[appstream]
name=CentOS Stream 8 - AppStream
#mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=Ap#pStream&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

Similarly, you can try to make changes in other 2 repos.

[root@dyson ~]# sudo vi /etc/yum.repos.d/CentOS-Stream-BaseOS.repo
[root@dyson ~]# sudo vi /etc/yum.repos.d/CentOS-Stream-Extras.repo

The last possible cause of this might be the extra repository present not letting tar to get installed, the repository was in /etc/yum.repos.d and named the Extras-common.repo.

Extra repo

After removing it, tar can be successfully installed. After installing tar successfully, we can proceed with OpenIAM installation further a noted in the installation instructions.