aheckmann / m

mongodb version management
MIT License
267 stars 55 forks source link

Does not work with Ubuntu 22.04 #90

Closed boutell closed 1 year ago

boutell commented 1 year ago

First: thanks so much for your work on m!

In Ubuntu 22.04, the following error comes up for mongodb 5.0, 6.0 and 7.0 (I didn't try anything older, but presumably the same):

ubuntu@ip-172-26-6-41:~$ npm install -g m
added 1 package, and audited 2 packages in 559ms
...
ubuntu@ip-172-26-6-41:~$ m 5.0
>> Checking for stable release of MongoDB 5.0
MongoDB version 5.0.21 is not installed.
Installation may take a while. Would you like to proceed? [y/N] y
...
Activating: MongoDB Server 5.0.21, MongoDB Database Tools 
ubuntu@ip-172-26-6-41:~$ mkdir -p ~/mongodb-data/5.0
ubuntu@ip-172-26-6-41:~$ mongod --dbpath=/home/apostrophe/mongodb-data/5.0
mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

I do have the right folder in my PATH:

ubuntu@ip-172-26-6-41:~$ which mongod
/home/ubuntu/.local/bin/mongod

Ubuntu 22.04 moved to openssl 3. But mongod community edition works fine on Ubuntu 22.04. It sounds like m is probably downloading the wrong binaries.

Any suggestions?

Thanks!

stennie commented 1 year ago

Hi @boutell,

Per the MongoDB Production Notes, Ubuntu 22.04 is only supported for MongoDB 6.0.4 or later.

MongoDB generally does not backport release packages to O/S versions which were released much later than the corresponding major version of MongoDB, so if you need MongoDB 5.0 on an Ubuntu 22.04 host you would have to install this in a Docker instance or VM.

However, m did need an update to check for Ubuntu 22 packages on newer server releases.

Can you try running the current m version from GitHub and confirm if this now works for a MongoDB 6.04+ install:

wget https://raw.githubusercontent.com/aheckmann/m/master/bin/m && chmod +x ./m ./m 6.0

m --version should report 1.8.6-dev

Thanks, Stennie

boutell commented 1 year ago

Thanks, that's really useful information about MongoDB 6 being the minimum! I will make sure our documentation does not suggest otherwise and I will try your command as well.

On Tue, Sep 19, 2023 at 7:44 AM Stephen Steneker @.***> wrote:

Hi @boutell https://github.com/boutell,

Per the MongoDB Production Notes https://www.mongodb.com/docs/manual/administration/production-notes/, Ubuntu 22.04 is only supported for MongoDB 6.0.4 or later.

MongoDB generally does not backport release packages to O/S versions which were released much later than the corresponding major version of MongoDB, so if you need MongoDB 5.0 on an Ubuntu 22.04 host you would have to install this in a Docker instance or VM.

However, m did need an update to check for Ubuntu 22 packages on newer server releases.

Can you try running the current m version from GitHub and confirm if this now works for a MongoDB 6.04+ install:

wget https://raw.githubusercontent.com/aheckmann/m/master/bin/m && chmod +x ./m ./m 7

m --version should report 1.8.6-dev

Thanks, Stennie

— Reply to this email directly, view it on GitHub https://github.com/aheckmann/m/issues/90#issuecomment-1725341916, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAH27IQ6XEQQFA4JVCLRK3X3GASRANCNFSM6AAAAAA45ALNYM . You are receiving this because you were mentioned.Message ID: @.***>

--

THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER APOSTROPHECMS | apostrophecms.com | he/him/his

boutell commented 1 year ago

I tried your command and it worked great, almost.

Specifically leaving off the .0 does not work.

But ./m 6.0 and ./m 7.0 both worked.

With just ./m 7 I get:

Prebuilt binaries for linux-x86_64 7 do not appear to be available.

Thanks!

boutell commented 1 year ago

(m --version reports the right version.)

stennie commented 1 year ago

Specifically leaving off the .0 does not work.

But ./m 6.0 and ./m 7.0 both worked.

With just ./m 7 I get:

Sorry @boutell, that was a bad usage example (I also edited my comment above to fix). Currently you do need to include the minor version (eg m 6.0 for latest 6.0.x release).

Regards, Stennie

boutell commented 1 year ago

💯 Thanks so much