bash-tools/wsl/wsl_cuda_fix.sh
2022-11-08 15:03:32 +08:00

22 lines
352 B
Bash

#!/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"