bash-tools/wsl/wsl_cuda_fix.sh

22 lines
352 B
Bash
Raw Normal View History

2022-11-08 03:14:23 +00:00
#!/bin/bash
# Check libraries
ldconfig
# Backup files in WSL lib
cd /usr/lib/wsl/lib/
cp libcuda.so libcuda.so.backup
cp libcuda.so.1 libcuda.so.1.backup
# Delete wrong files
rm -r libcuda.so
rm -r libcuda.so.1
# Create symbolic links
ln -s libcuda.so.1.1 libcuda.so
ln -s libcuda.so.1.1 libcuda.so.1
# Check libraries again
ldconfig
echo "Fixed"