Issue Installing MongoDB Community Server -

While trying to download MongoDB Community Server, I come across this error.

“Error Writing to file:
C:\WINDOWS\system32\msvcp140.dll. Verify that you have access to that directory.”

I have attempted to troubleshoot and resolve this issue on my own. I watched a youtube video that proposed 2 different solutions, one involved downloading the 32 bit version and 64 bit version of this file and putting it into their appropriate folders. I came across an error that stated “The action can’t be completed because the folder or a file in it is open in another program” (I could not determine what program was using it, and if i could kill it)
The second proposed solution that didn’t work for me was downloading Visual C++ Redistributable, no luck there.

Any insights would be really greatly appreciated, thank you!

do not blindly trust dll-only download sites.

140 means files came with Visual Studio v14 2015. if you want to make sure it is installed, you need the same version of C++ redistributable:
Download Visual C++ Redistributable for Visual Studio 2015 from Official Microsoft Download Center

now for the access problem, there are few reasons:

  • your disk might have corruption issues ont the location this file is written. this is worst scenario. try disk checking if needed. you may even need to replace the disk if this is the case.
  • the file is in active use by some other program. 3rd party apps and especially games does that. at least we can say it is from last 7 years, if this is the case. check the system tray first, then task manager for probable programs. one thing for sure is it will be something you installed.
  • now breathe because this is most probable cause: you are not an admin, or did not start the installer as admin. if installer does not propmt for admin rights, right click on the file and select “run as admin” and click ok button in the prompt. supply password if you have set it.
1 Like

Resolved, thank you very much!