-
Notifications
You must be signed in to change notification settings - Fork 871
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
libcuda.so.1 is not a symbolic link #5548
Comments
Is there a solution for this? My |
It's in Thus far the warning hasn't proved blocking in any way. It isn't even that clear (to me) why |
What would cause problems with symlinking from system32. Like I know generally altering system32 is bad, but would symlinks cause problems? |
Directory of C:\Windows\System32\lxss\lib 09/18/2020 03:53 PM .08/30/2020 09:51 AM 124,664 libcuda.so 09/12/2020 08:44 AM 832,936 libd3d12.so 09/12/2020 08:44 AM 5,073,944 libd3d12core.so 09/12/2020 08:44 AM 25,069,816 libdirectml.so 09/12/2020 08:44 AM 878,768 libdxcore.so 08/30/2020 09:51 AM 40,496,936 libnvwgf2umx.so 6 File(s) 72,477,064 bytes 1 Dir(s) 643,723,309,056 bytes free C:\Windows\System32\lxss\lib>mklink libcuda.so.1 libcuda.so |
simlynk generates new error sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi |
docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -privileged -gpu -benchmark NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled. Error: only 0 Devices available, 1 requested. Exiting. NOTE: the -privileged switch changes the error from above |
|
What happens if tou ad
-- compair after benchmark ? Forget it if one or two dashes
|
/usr/lib/wsl/lib is included through /etc/ld.so.conf.d. You will find a file there with instructions how to prevent its generation. You have to delete that file and create /etc/wsl.conf with the fillowing lines:
|
Same problem here using Win 10 build 20257.1 both with ubuntu 18.04 and ubuntu 20.04 (kernel 4.19.128). |
works for CUDA in WSL, but "Segmentation fault" in DirectML |
Will this issue ever be fixed? |
There is another solution works for me :
ln -s libcuda.so.1.1 libcuda.so.1
ln -s libcuda.so.1.1 libcuda.so Done. |
Having this output running
Just upgraded to Windows 11 and installed |
This solution worked for me with the addition of granting permissions on the lib folder to my regular (non-admin) user. Don't forget to revert the permissions afterwards. ;) |
Exact same issue. Solution below worked for me, too.
|
I am new to this, and I din't get what you sould do in the solution u all said works... I deleted libcuda.so and libcuda.so.1 using File Explorer, now I am having trouble figuring out the next part, thank you in advance! |
I don't want to delete anything under
echo -e "[automount]\nldconfig = false" | sudo tee -a /etc/wsl.conf
sudo mkdir /usr/lib/wsl/lib2
sudo ln -s /usr/lib/wsl/lib/* /usr/lib/wsl/lib2
echo /usr/lib/wsl/lib2 | sudo tee /etc/ld.so.conf.d/ld.wsl.conf |
Works on my machine. Why isn't this not fixed by WSL already? |
|
This also happens in Arch whenever you use pacman. It seems like this isn't limited to Ubuntu. (Note: I used
|
Can this issue be given the "bug" label? |
Primarily for Windows 11 users (since it uses the One time configuration:
Then add the following to
That:
It's also possible to get this running on Windows 10 using a Side-note: It might be better to delete and regenerate all of the symlinks on each restart of the WSL distribution anyway. This would make sure that any changes to the libs in a new WSL release are properly symlinked. |
After two years of discussion |
This should be flagged as the real workaround until an official fix is provided. @craigloewen-msft is it possible to have a bit of attention on this one? Should be trivial to be fixed. Thank you |
I've also been seeing this issue for quite some time. I'm running a custom WSL2 image initially generated from what was then the latest upstream Gentoo 'stage3' tarball as of some time on February 26th, 2022 using the instructions from here and the relevant Gentoo Wiki page. I've kept both the default, main Gentoo ebuild repository and another ebuild repository I added later synced and kept my packages up to date by re-'
This has all worked rather well, for the most part. I'm not going to mess with my System32 folder or any other Windows OS folders/files, obviously, or any WSL2 filesystem mappings. I'll just wait for an official fix to land. Edit: I forgot to mention that I'm also currently using:
|
Just mentioning: this issue was opened more than 3 years ago... |
It's Microsoft, we can't expect much... |
If no-one at Microsoft gets @mentioned, I don't think much will happen, as this issue has most likely sunk to the bottom of the pile. |
Is there any progress here? |
I believe there is a bigger problem on Nvidia side. If I do a soft symlink libcuda.so.1.1 to libcuda.so.1 and libcuda.so respectively in |
I was curious about how to fix this while minimising the changes I needed to make to any system files and I came up with an alternative fix that is applicable to certain WSL installations and doesn't involve deleting anything in System32. If your WSL is in You can check where You can create the links that mklink "C:\Program Files\WSL\lib\libcuda.so.1" libcuda.so.1.1
mklink "C:\Program Files\WSL\lib\libnvoptix_loader.so.1" libnvoptix.so.1 Otherwise, if your |
Hello, anyone from Microsoft here? The bug is laughably old. |
Paste in Console - Terminal =) ln -s libcuda.so.1.1 libcuda.so.1 |
Rephrasing @nchj: "After |
@wswind #5548 (comment) -Thanks!
This seemed to have solved it for me. |
Haha, it's my pleasure. I switched to a laptop without nvidia graphics card and haven't seen this problem since then. I'm impressed that this issue hasn't been fixed after all these years.. 😂 |
Hi all. I still have this problem. Is there no official solution from the WSL team? |
Hi all, I've just run into the same bug when installing nvidia drivers into wsl: |
##5548 (comment) |
What would happen if I just ignore it? I dont dare to do anything without official solusion. |
@infish155 Per the thread above, nothing seems to actually be broken by the error. Ignoring it is just fine - That's what most others are doing in the meantime :-) |
“failed to create symbolic link 'libcuda.so.1': Permission denied”, what should I do sir |
fixed with cmd admin, but another problem arises: CUDA backend failed to initialize: FAILED_PRECONDITION: No visible GPU devices. |
Once a Windows NVIDIA GPU driver is installed on the system, CUDA becomes available within WSL 2. The CUDA driver installed on Windows host will be stubbed inside the WSL 2 as libcuda.so, therefore users must not install any NVIDIA GPU Linux driver within WSL 2. |
Running into this myself with both Ubuntu and Debian from the Microsoft Store. This solved it when run inside the linux terminal:
|
remember to execute sudo ldconfig after softlink in the directory of /usr/lib/wsl/lib, rather than C:\Windows\System32\lxss\lib |
2025 and I still need to waste time with this amateur shyte. All developers should send invoice to MS and NVIDIA for that - especially us business licensed customers - you would see how things would get fixed!!! Even with open-source help they are not able to fix it in Q2/2025 EDIT: Running latest Win 11 Insider + latest WSL2 (wsl --update and so on) |
This is cross-post of Ubuntu bug 1886532 which is pending investigation.
On Windows 10 build 20161 WSL2 running sudo apt upgrade results in warning:
"libcuda.so.1 is not a symbolic link"
It appears to be a result of a postinst hook in libc-bin.
https://bugs.launchpad.net/ubuntuwsl/+bug/1886532
The text was updated successfully, but these errors were encountered: