Install MongoDB 4.4 on Red Hat Linux 9


I’m trying to install Mongo DB 4.4 on a Red Hat Linux 9. Is this alreay supported?
After having configured the yum repo as from the official documentation and run the installation command, I’m facing this error:

[root@cs-c2-db-01 yum.repos.d]# yum install -y mongodb-org
Updating Subscription Management repositories.
Last metadata expiration check: 0:00:40 ago on Sat 04 Jun 2022 12:44:18 PM BST.
Dependencies resolved.
 Package                                                             Architecture                              Version                                               Repository                                                           Size
 mongodb-org                                                         x86_64                                    4.4.14-1.el8                                          mongodb-org-4                                                        11 k
Installing dependencies:
 compat-openssl11                                                    x86_64                                    1:1.1.1k-4.el9_0                                      rhel-9-for-x86_64-appstream-rpms                                    1.5 M
 cyrus-sasl                                                          x86_64                                    2.1.27-20.el9                                         rhel-9-for-x86_64-baseos-rpms                                        77 k
 cyrus-sasl-gssapi                                                   x86_64                                    2.1.27-20.el9                                         rhel-9-for-x86_64-baseos-rpms                                        29 k
 cyrus-sasl-plain                                                    x86_64                                    2.1.27-20.el9                                         rhel-9-for-x86_64-baseos-rpms                                        27 k
 mongodb-database-tools                                              x86_64                                    100.5.2-1                                             mongodb-org-4                                                        47 M
 mongodb-org-database-tools-extra                                    x86_64                                    4.4.14-1.el8                                          mongodb-org-4                                                        23 k
 mongodb-org-mongos                                                  x86_64                                    4.4.14-1.el8                                          mongodb-org-4                                                        17 M
 mongodb-org-server                                                  x86_64                                    4.4.14-1.el8                                          mongodb-org-4                                                        22 M
 mongodb-org-shell                                                   x86_64                                    4.4.14-1.el8                                          mongodb-org-4                                                        14 M
 mongodb-org-tools                                                   x86_64                                    4.4.14-1.el8                                          mongodb-org-4                                                        11 k

Transaction Summary
Install  11 Packages

Total download size: 102 M
Installed size: 322 M
Downloading Packages:
(1/11): mongodb-org-database-tools-extra-4.4.14-1.el8.x86_64.rpm                                                                                                                                                65 kB/s |  23 kB     00:00    
(2/11): mongodb-org-4.4.14-1.el8.x86_64.rpm                                                                                                                                                                     23 kB/s |  11 kB     00:00    
(3/11): mongodb-org-mongos-4.4.14-1.el8.x86_64.rpm                                                                                                                                                              18 MB/s |  17 MB     00:00    
(4/11): mongodb-org-server-4.4.14-1.el8.x86_64.rpm                                                                                                                                                              12 MB/s |  22 MB     00:01    
(5/11): mongodb-org-tools-4.4.14-1.el8.x86_64.rpm                                                                                                                                                               41 kB/s |  11 kB     00:00    
(6/11): mongodb-org-shell-4.4.14-1.el8.x86_64.rpm                                                                                                                                                              9.7 MB/s |  14 MB     00:01    
(7/11): mongodb-database-tools-100.5.2.x86_64.rpm                                                                                                                                                               13 MB/s |  47 MB     00:03    
(8/11): cyrus-sasl-gssapi-2.1.27-20.el9.x86_64.rpm                                                                                                                                                              29 kB/s |  29 kB     00:00    
(9/11): compat-openssl11-1.1.1k-4.el9_0.x86_64.rpm                                                                                                                                                             1.1 MB/s | 1.5 MB     00:01    
(10/11): cyrus-sasl-2.1.27-20.el9.x86_64.rpm                                                                                                                                                                   496 kB/s |  77 kB     00:00    
(11/11): cyrus-sasl-plain-2.1.27-20.el9.x86_64.rpm                                                                                                                                                             135 kB/s |  27 kB     00:00    
Total                                                                                                                                                                                                           26 MB/s | 102 MB     00:03     
Problem opening package mongodb-database-tools-100.5.2.x86_64.rpm
Problem opening package mongodb-org-4.4.14-1.el8.x86_64.rpm
Problem opening package mongodb-org-database-tools-extra-4.4.14-1.el8.x86_64.rpm
Problem opening package mongodb-org-mongos-4.4.14-1.el8.x86_64.rpm
Problem opening package mongodb-org-server-4.4.14-1.el8.x86_64.rpm
Problem opening package mongodb-org-shell-4.4.14-1.el8.x86_64.rpm
Problem opening package mongodb-org-tools-4.4.14-1.el8.x86_64.rpm
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: GPG check FAILED

Can anyone help me please?

Try yum clean all (which will toss all your cache and a bunch of other bookkeeping) and then try again.

Also show us the output of the following 2 commands, please:

  • uname -a
  • cat /etc/os-release

Hi Jack,

thanks for the replay.
The command yum clean all didn’t do the trick.
Here the new feedback from the yum install mongodb-org and the output of the 2 suggested commands:

[root@cs-c2-db-01 yum.repos.d]# yum install mongodb-org
Updating Subscription Management repositories.
MongoDB Repository                                                                                                                                                                                             973  B/s | 390  B     00:00    
Errors during downloading metadata for repository 'mongodb-org-4.4':
  - Status code: 404 for (IP:
Error: Failed to download metadata for repo 'mongodb-org-4.4': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[root@cs-c2-db-01 yum.repos.d]# uname -a
Linux cs-c2-db-01 5.14.0-70.13.1.el9_0.x86_64 #1 SMP PREEMPT Thu Apr 14 12:42:38 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@cs-c2-db-01 yum.repos.d]# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="9.0 (Plow)"
PRETTY_NAME="Red Hat Enterprise Linux 9.0 (Plow)"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"

hi @Samuel_Rabini … I just fed that repository url into my browser and I get:

404 Not Found

    Code: NoSuchKey
    Message: The specified key does not exist.
    Key: yum/redhat/9/mongodb-org/4.4/x86_64/repodata/repomd.xml
    RequestId: CA9M6WCGC930ZH8V
    HostId: ULD4o7XGDoRwppqUBecJB1JkhX4dZGoK6OSOwToxOD9QOAWfcA99xrR7BEr1TXoXTJ8kEzzPvNw=

So the yum repo file you’re using is incorrect for some reason. Check the docs for the install and make sure it’s correct, or try the another version of MongoDB or something …

1 Like

I grab the repo configuration from the official MongoDB WebSite guide. So I think that’s too early for RHEL 9…

I think you’re right. If we go one directory up to MongoDB Repositories we see:

Index of redhat

Parent Directory