WSL libcuda is not a symbolic link

When I do an update with Ubuntu 20.04 on WSL I get the following message:

/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

How can I fix this?

1 Answer

I have the same issue, but to be honest, I haven't tried this suggested fix yet. I've just been living with it for now. It's a harmless message, really.

You can find the open WSL issue here for more reading, but to summarize:

  • As one of the WSL developers says in this comment:

    mucking your System32 is not recommended for lots of good reasons

    Which I agree with, and is mainly the reason I haven't tried the recommended fix below.

  • Several of the suggested fixes there cause issues with CUDA development, so I haven't tried those either.

  • The primary fix seems to be to delete libcuda.so and libcuda.so.1 from C:\Windows\System32\lxss\lib as an Administrator in Windows (not from WSL).

    Then, in WSL:

    sudo ln -sr /mnt/c/Windows/System32/lxss/lib/libcuda.so.1.1 /mnt/c/Windows/System32/lxss/lib/libcuda.so.1
    sudo ln -sr /mnt/c/Windows/System32/lxss/lib/libcuda.so.1.1 /mnt/c/Windows/System32/lxss/lib/libcuda.so

    I've made some slight (untested) changes to the commands above to (a) use sudo (which is required), and (b) use fully-qualified paths and the ln -r option. This just means you don't need to cd to the directory ahead of time. If there are any problems with the version I provided, fall back to the instructions in that post.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like