Trying to installing MongoDB 3.6.2 on Windows, it kept hanging.
TL;DR; The installer is trying to download MongoDB Compass by executing a PowerShell script but if script execution is disabled, the installer just hangs. Clicking ‘Cancel’ doesn’t seem to do anything. Abort the installation by killing the PowerShell process. If you wish to try out MongoDB Compass, consider whether it is appropriate to adjust PowerShell script execution policy on your machine, or perhaps download MongoDB Compass separately (link at bottom of the page).
During the install, I was prompted to install ‘MongoDB Compass’…
I hadn’t tried MongoDB Compass before, but being a weekend job I thought I’d give it a go. Not sure I’ll be easily swayed from Studio 3T (formerly MongoChef – check them out at studio3t.com) but interested to have a look.
Unfortunately, during the install, it hangs…
So I have a look at what’s going, on…
This PowerShell process looks suspicious, so I have a look in the MongoDB install folder…
That’s the one. It’s trying to run execute the PowerShell script to download/install MongoDB Compass.
Trying to kick off that script, you see…
And there’s the problem. Trying to download/install MongoDB Compass using a PowerShell script, but script execution policy doesn’t allow that so the installer just hangs.
Clicking ‘Cancel’ on the hung MongoDB installer doesn’t seem to do anything. I had to kill the PowerShell process to get it to exit. I then ran the installer again and completed the installation without checking “Install MongoDB Compass”.
If you do want to install MongoDB Compass, you should consider whether it is safe and appropriate to adjust the PowerShell script execution policy on the particular machine you’re working with. For a developer workstation or personal PC you might not be as strict as on a production server.
Full details about setting PowerShell script execution policy can be found at…
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy
A better option may be to downloading and installing MongoDB Compass separately…
https://www.mongodb.com/download-center?filter=community#compass
Thanks a lot , saved my day !!
Thanks so much, your suggestion to skip compass install was right on spot. Thanks for the download link to the compass too.
Thank you, this saved me a lot of time!!
Thanks Man….!! Saved me sometime….!!
I was having the same problem, thanks.
Thank you so much, your advice was so helpful.
Thanks for this article, very helpful
Thanks a lot. I had the exact same problem and your fix was right on!
Thanks a lot! It helped in a great way.
Thanks this was very helpful
so helpful, thanks a lot!!
Thanks for the information. This is what I did when mongoDB compass stucked.
I did end Powershell process from task manager, then it asked me to cancel/continue mongodb installation, I selected ‘Continue’ and proceeded further. Surprisingly it worked and mongoDB installed without any errors.