A note about installing MongoDB 7.0 on Fedora 40 Workstation
June 16, 2024 · 2 min · widnyana
I’m in the need to install mongosh on my Fedora Linux 40 Workstation, as a context the MongoDB server is using version 7.x running in container using docker-compose.yaml on docker version 26.1.4.
By default, MongoDB does not provide a repository for Fedora, they only have for RHEL / CentOS Stream / Oracle / Rocky / AlmaLinux. And since Fedora 40 is the latest version, we can use official MongoDB repository for redhat-9.
Create new file on /etc/yum.repos.d/mongodb-org-7.0.repo with following contents:
root@localhost:~# sudo dnf install mongodb-mongosh-shared-openssl3
Last metadata expiration check: -1 day, 17:55:42 ago on Sun 16 Jun 2024 09:15:26 PM WIB.
Dependencies resolved.
================================================================================================================================================================================================================================================ Package Architecture Version Repository Size================================================================================================================================================================================================================================================Installing:
mongodb-mongosh-shared-openssl3 x86_64 2.2.9-1.el8 mongodb-org-7.0 54 M
Transaction Summary================================================================================================================================================================================================================================================Install 1 Package
Total size: 54 M
Installed size: 243 M
Is this ok [y/N]: y // press 'y' follow by 'enter'
DO NOT install the mongodb-mongosh package, or you will get this following error when invoking the command: