Installing in M1 and more than one version

I am trying to intall mongo through brew, but when launching it I am getting this error:

exec: Failed to execute process '/opt/homebrew/bin/mongod', unknown error number 86

launching throug:

mongod --config /opt/homebrew/etc/mongod.conf --fork

this isn’t happening when launching throug brew services, but cant access the shell using mongosh, obtaiing the same error.

On the other hand, as mentioned in the installation guide

Alternatively, you can specify a previous version of MongoDB if desired. You can also maintain multiple versions of MongoDB side by side in this manner.

What could be the way to launch one version and the other (in different moments)?

Thanks in advance,

What does Brew services list/status show?
I think it is possible to run different versions but you have to be careful in setting the environment

running brew services list I am getting error

when launching v4.4, which isn’t happening when using v5.0:

I followed the documentation to install both versions from here and here but I am starting to think that maybe the docs are missing to note something related on the M1 Apple silicon system.

Right now, the version 5.0 works as expected running either of this commands:

mongod --config /opt/homebrew/etc/mongod.conf --fork


brew services start mongodb-community@5.0

Instead the v4.4 doesn’t work in any way.