Blog About Hardware guide

WSL2 - Fix Could not load library Error:

If you get this error on WSL2:

Could not load library Error: cannot open shared object file: No such file or directory

To fix the problem you can do :

export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH

Here are the specs for which this error happened:

WSL2 (Ubuntu 22.04):

NVIDIA driver 536.40

wsl --version

WSL version:
Kernel version:
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version:
Windows version: 10.0.22621.1848

tags: WSL2 - error - -