-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link #5663
Comments
/dupe #5548 |
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
I was able to build darknet by making a symlink to the directory where the rest of my cuda library files were
With the help of: pjreddie/darknet#1480 |
I don't find the folder /usr/lib/wsl, How do you get it ? Or how do you install the cuda? |
This is specifically for Nvidia CUDA in WSL 2 with the Windows Insider Preview on the Dev Channel. I followed this guide after I had Windows Insider Preview on Dev Channel set up: https://docs.microsoft.com/en-us/windows/win32/direct3d12/gpu-cuda-in-wsl |
Please review response post by @PhyX-Meow re: yuk7/ArchWSL#248. Run a command line shell as Administrator, type "cmd" to get a non-powershell command line. Then type the following commands to create the problematic symbolic links: C: when you're done, it will look like this: C:\Windows\System32\lxss\lib> DIR 03/15/2022 03:59 PM libcuda.so [libcuda.so.1.1] 03/15/2022 04:00 PM libcuda.so.1 [libcuda.so.1.1] Then, just finish your command you were running, The error I received in my "apt upgrade -y" command was two lines: As per @PhyX-Meow "Actually this is not relate to Arch, nor ArchWSL. It's caused by libcuda.so in your C:\Windows\System32\lxss\lib\ folder not a symbolic link, which is installed by nvidia driver. One solution to [remove] the warning is delete libcuda.so and libcuda.so.1 and use make symbolic link to libcuda.so.1.1. Command line: mklink :) |
@John-Joubert My directory listing in the one folder is this:
|
@ArrowRaider Try restart wsl2, or restart your pc. |
@John-Joubert that worked for me... I'm wondering why this bug is closed if we still have to do this manual workaround. -- Why can't this just be fixed in WSL? |
When I do this things then have something like this:
And CPU not GPU doing all :( |
This approach worked to me, but on the next day my WSL 2 crashed. Then I just give an |
I made a slight tweak to your command for anyone struggling getting this to work. Adding && between the various commands ensures proper evaluation from left to right, otherwise users might run into
If the error persists after doing the command, shutdown and restart wsl. |
Why was this issue closed? The problem still persists for me, and I find myself having to use the manual workaround. Could someone take another look, please? |
I have ran into this problem. @John-Joubert His comments works for me after a WSL restart. You may considering a restart. |
As formerly said, the issue has nothing to do with wsl itself. Linux programs require the file to be a symlink, while nvidia driver installed the file as a regular one. You should go for nvidia driver forum or linux community. We can do nothing here 😞 |
Go to https://forums.developer.nvidia.com/t/wsl2-libcuda-so-and-libcuda-so-1-should-be-symlink/236301 and like/comment, maybe we'll get some traction. |
same issue.. |
PS C:\Users\sergey> wsl --version
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1702 |
I have created a Tensorflow container in docker installed in WSL, but with this solution, Tensorflow can't find the GPU. By running some process that produces this error and then putting it back into the file again, Tensorflow can find the GPU.
Do something that produces this error.
|
- Need to install dependencies for qwt using the install_qt_ubuntu.sh script - Fix libcuda simlink - NVidia driver problem on WSL2: - microsoft/WSL#5663 (comment) - https://forums.developer.nvidia.com/t/wsl2-libcuda-so-and-libcuda-so-1-should-be-symlink/236301 Signed-off-by: Adrian Stanea <[email protected]>
- Need to install dependencies for qwt using the install_qt_ubuntu.sh script - Fix libcuda simlink - NVidia driver problem on WSL2: - microsoft/WSL#5663 (comment) - https://forums.developer.nvidia.com/t/wsl2-libcuda-so-and-libcuda-so-1-should-be-symlink/236301 Signed-off-by: Adrian Stanea <[email protected]>
- Fix libcuda simlink - NVidia driver problem on WSL2: - microsoft/WSL#5663 (comment) - https://forums.developer.nvidia.com/t/wsl2-libcuda-so-and-libcuda-so-1-should-be-symlink/236301 Signed-off-by: Adrian Stanea <[email protected]>
- Fix libcuda simlink - NVidia driver problem on WSL2: - microsoft/WSL#5663 (comment) - https://forums.developer.nvidia.com/t/wsl2-libcuda-so-and-libcuda-so-1-should-be-symlink/236301 Signed-off-by: Adrian Stanea <[email protected]>
same issue.... Does this need to be open? A manual workaround that requires admin privileges isn't feasible for most. |
Same issue. The manual binding workaround doesn't seem to help me/ |
Same with me. Workaround only survives until next nvidia driver update, then it must be done again. |
Looks like this bug was closed as a duplicate of #5548 -- I totally missed that and thought this was closed because a workaround existed (which would be super lame) -- but it looks like #5548 is still open, so for further discussion we should go there I guess. 🙂 |
This happens to be the first one to show online |
I'm noticing that this error (or warning?) is showing when installing
When inspecting the -rwxrwxrwx 1 root root 14 Dec 31 03:31 libcuda.so
-rwxrwxrwx 1 root root 14 Dec 31 03:31 libcuda.so.1
-r-xr-xr-x 1 root root 158304 Dec 7 00:05 libcuda.so.1.1 So my fix was not so much to do anything on the Windows side, but rather directly in WSL Ubuntu 22.04: cd /usr/lib/wsl/lib
sudo rm libcuda.so
sudo rm libcuda.so.1
sudo ln -s libcuda.so.1.1 libcuda.so
sudo ln -s libcuda.so.1.1 libcuda.so.1 Now when I run UPDATE:
And after uninstalling Ubuntu 22.04 and re-installing again, I'm seeing that there are now symlinks in the |
Got this from the nvidia site. I screwed up the link. |
John-Joubert
commented
Jan 14, 2025
via email
•
edited by microsoft-github-policy-service
bot
Loading
edited by microsoft-github-policy-service
bot
Thanks for the kind update!
I simply went there, removed the libcuda.so file, and make a symbolic link to the libcuda.so.1.1 file and named it libcuda.so.
And then everything went fine. No extra steps (at least thus far).
Thanks for the your kind suggestion, so nice of you!
…________________________________
|
Environment
Question
I can successfully use tensorflow-gpu under ubuntu18.04-wsl2 with install 455.41_gameready_win10-dch_64bit_international.exe, but when I start to compile darknet it prompts error :
sh /usr/bin/ld: cannot find -lcuda collect2: error: ld returned 1 exit status
So i execute
sudo ldconfig -v
:/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link libcuda.so.1 -> libcuda.so.1.1
Then execute
sudo ln -sf /usr/lib/wsl/lib/libcuda.so.1.1 /usr/lib/wsl/lib/libcuda.so.1
,it prompts
ln: failed to create symbolic link '/usr/lib/wsl/lib/libcuda.so.1': Read-only file system
How can I successfully compile darknet?Thanks
The text was updated successfully, but these errors were encountered: