Windows Subsystem for Linux–“Cannot allocate memory”

I’ve been working on some of the open source .NET Core code lately and using the Windows Subsystem for Linux to run it in Linux.  In general, this has worked really well.  It so nice to have Linux right inside Windows!

I did come across an issue today that I wasn’t about to find any help on.  Ran a script with sudo and received the following error:

“the specified task executable “sh” could not be run. cannot allocate memory”

I first tried to close and restart WSL but no change. Next I rebooted my machine and that resolved the issue.

Not sure why this occurred.  I was sitting at around 75% memory utilization at the time of the error and then 30% after reboot.

Hope this helps others!

Please follow and like us:

2 thoughts on “Windows Subsystem for Linux–“Cannot allocate memory””

Leave a Reply