From f08f0ec971b730b3a08c24d6f4fafd059f7ac166 Mon Sep 17 00:00:00 2001 From: Chris Wong Date: Tue, 8 Nov 2022 11:14:23 +0800 Subject: [PATCH] first commit --- wsl_cuda_fix.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 wsl_cuda_fix.sh diff --git a/wsl_cuda_fix.sh b/wsl_cuda_fix.sh new file mode 100644 index 0000000..d074ed4 --- /dev/null +++ b/wsl_cuda_fix.sh @@ -0,0 +1,22 @@ +#!/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" \ No newline at end of file