This is ridiculous its mid-October 2022 and still no way to install monogodb on 22.04 LTS?
Ridiculous and even with all these adaptations it doesn’t work well. I’m not going to remake a whole server for this. Does anyone know if Fedora is working normally?
According to the installation page Fedora is not in the list of supported Linux distributions:
As for latest versions of Linux, it appears that Ubuntu 22.04 is not the only recent distro not supported officially at this time, RHEL 9 is not listed as supported either and that came out 17 May.
Trying to shoehorn the tool onto a non-supported platform is not advised. The steps listed in this thread is putting libraries that Ubuntu has deprecated and no longer ships for a reason back on to the system. This is never a good idea. It is better to file a bug report, or vote up one that was already submitted so that the MongoDB team knows that this is a serious issue.
I get that it sucks that MongoDB is behind in making sure the release of its software does not run on platforms that were released several months prior to MongoDB’s own release, but that’'s the way it is currently. Hopefully in the future there is not this type of problem when new versions of MongoDB are released.
Although I am also disappointed that 22.04 is not yet a supported platform I don’t support this comment. As an engineer who is building a data platform it is the duty of that role to understand the supported OS, architecture and other requirements before beginning that build out.
A sample of contemporary databases reveals a mixed bag and a trend toward the previous stable releases.
- RHEL/CentOS 8
- Ubuntu 20.04
- RHEL 8.x
- Ubuntu 20.04
- RHEL/Centos/OEL 8
- Ubuntu 20.04
- RHEL 8.1
- Ubuntu 20.04
- RHEL 9
- Ubuntu 22.04
- RHEL/Rocky 9
- SLES 15
- Ubuntu 20.04
- RHEL/OEL 8.2
- SLES 15
- Rocky/RHEL 8
- Ubuntu 22.04
- RHEL 8.x
- SLES 15
- Ubuntu 20.04
This solutions is WORKED on my Ubuntu 22.04!!!
But need to follow the Fernando’s command to install libssl1.1, otherwise the package would not be found. Glad to have you guys. Thanks
So if you need a recap:
sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common
echo "deb http://security.ubuntu.com/ubuntu impish-security main" | sudo tee /etc/apt/sources.list.d/impish-security.list
- Go to root user
sudo -i
then paste thiswget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
- Still run
dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
command on the root user, and so on. apt update
apt install libssl1.1
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
apt update
apt install -y mongodb-org
I just want to call out here that by installing the package mentioned above, you are introducing vulnerabilities to your system. Again, there is a reason that Ubuntu (and other distros) are no longer shipping this version.
As a test, I started a container running Ubuntu 22.04, installed this package as mentioned above, and then ran a scan with a couple of container scanning tools.
According to Snyk there are 9 vulnerabilities (6 medium severity and 3 high severity) in this version of libssl
.
According to Grype, there are 13 vulnerabilities (4 low, 6 medium, 3 high):
Sure these issues still exist under 20.04 (and any distro that ships this version), but I don’t know if people are thinking about the implications of installing deprecated versions of libraries on newer systems.
Again I would file bug requests, or upvote an existing bug request, as that shows MongoDB that this is something they should focus on. While Stennie and other people report on what they see here to others within the MongoDB organization, bug reports get more traction and notice within MongoDB.
I installed the 6.0.3~rc2 on Ubuntu 22.04 no workarounds So it looks like it is close.
Chris;
That is excellent news.
Version 6.0.3 has been released on github!
But the standard installation way does not work yet:
sudo apt-get install -y mongodb-org=6.0.3 …
The following packages have unmet dependencies:
mongodb-org-mongos : Depends: libssl1.1 (>= 1.1.1) but it is not installable
mongodb-org-server : Depends: libssl1.1 (>= 1.1.1) but it is not installable
…
Yep!
Work fine for me(set repo jammy):
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt-get update
sudo apt-get install mongodb-org
Good to know. I think I’ll let it simmer for a while before I upgrade to jammy and monogdb 6.0.
I see an issue in step9, I tried many workarounds but nothing worked.
I am using Ubuntu22.04 and trying to install the MongoDB package but getting an error “E: Unable to locate package mongodb-org” as a workaround tried to install “apt install -y mongodb” but then again getting the same issue “E: Unable to locate package mongodb”.
Please let me know if anyone can help here.
Thanks Alex, here are some commands to run the installation that don’t throw an error about apt-key being deprecated, and are slightly more secure:
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor | sudo tee /usr/share/keyrings/mongodb.gpg > /dev/null
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt update
sudo apt install mongodb-org
Happy to report that after far, far too many months following this issue @Toby_LL has provided the magic commands to install MongoDB v6 on Ubuntu 22.04. TYSM.
Any reason why the service wouldn’t also be installed with this approach? I’m not well versed in linux operation, but I think I have things installed correctly?
When I try to sudo service mongod start
like I used to, I get mongod: unrecognized service
.
systemctl list-units --all | grep mongo
and see what it says.
Thanks for the quick response @Jack_Woehr. I’m running WSL2 on windows 11. When I run that command, I get System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
Thinking this may be an issue with WSL2?
Sounds like it’s WSL2. I know very little about Windows and WSL2.
Correct. It does not have a init system.
I think that this can run as a service but it is done in a wsl/windows way.
Start mongodb by invoking sudo -u mongodb mongod --config /etc/mongod.conf
As it is not being executed by the systemd units mongod will be running with the user mongodb ulimits, if you are doing anything other than light development adjust the ulimits.
Otherwise just install the windows version.
This is really should be its own topic as this isn’t just ‘MongoDB on Ubuntu 22.04’
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
Not able to start service with MONGODB 7.0.5 on Rcoky linux 9 | 0 | 369 | Jul 2024 |
Attempting to upgrade from 3.6.23 to latest version and having issues | 0 | 59 | Aug 2024 |
Service started Successfully but shows error 3584 in brew services list | 5 | 315 | Oct 2024 |
Can we use MongoDB Enterprise (3.6.23) in production server? | 1 | 70 | Sep 2024 |
Upgrading MongoDB Replica Set from 4.0 to 7.0 – Potential Issues and Considerations | 1 | 102 | Dec 2024 |