-
Notifications
You must be signed in to change notification settings - Fork 834
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
Issue installing CUDA 11 for WSL2 - unmet dependencies #6582
Comments
@laurelrr Did you download the WSL NVIDIA driver, or any NVIDIA driver? I am on 470.14, yours is showing 465.42. |
I have since fixed this specific issue by uninstalling and re-installing the same 465.42 driver (restarting) and pointing my /usr/local/cuda -> /usr/local/cuda-11.2.
|
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
|
Environment
Steps to reproduce
I was following the instructions for installing CUDA on WSL2 using the instructions here:
https://medium.com/swlh/how-to-install-the-nvidia-cuda-driver-and-toolkit-in-wsl2-46e2161c91d8
which got me farther than the official instructions on NVIDIA's site.
These are the specific steps:
> wsl --update
> wsl --shutdown
> wsl
(now I'm running Ubuntu 18.04)
$ sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
$ sudo sh -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list'
$ sudo apt-get update
$ sudo apt-get --yes install cuda-toolkit-11-0 cuda-toolkit-10-2
This is where I saw my first dependency errors. It unpacked a bunch of drivers and packages correctly but failed here:
Errors were encoutered while processing:
/tmp/apt-dpkg-install-uLV4X4/05-libnvidia-gl-460_460.32.03-0ubuntu1_amd64.deb
Initially I tried the suggested 'apt --fix-broken install' but I get the same messages about dependencies.
I tried manually installing the missing files but they won't install due to dependency issues.
sudo apt-get install libnvidia-ifr1-460:amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
libnvidia-ifr1-460 is already the newest version (460.32.03-0ubuntu1).
libnvidia-ifr1-460 set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
cuda-drivers-460 : Depends: libnvidia-gl-460 (>= 460.32.03) but it is not going to be installed
libnvidia-ifr1-460 : Depends: libnvidia-gl-460 but it is not going to be installed
nvidia-driver-460 : Depends: libnvidia-gl-460 (= 460.32.03-0ubuntu1) but it is not going to be installed
Recommends: nvidia-prime (>= 0.8) but it is not going to be installed
Recommends: libnvidia-compute-460:i386 (= 460.32.03-0ubuntu1) but it is not installable
Recommends: libnvidia-decode-460:i386 (= 460.32.03-0ubuntu1) but it is not installable
Recommends: libnvidia-encode-460:i386 (= 460.32.03-0ubuntu1) but it is not installable
Recommends: libnvidia-ifr1-460:i386 (= 460.32.03-0ubuntu1) but it is not installable
Recommends: libnvidia-fbc1-460:i386 (= 460.32.03-0ubuntu1) but it is not installable
Recommends: libnvidia-gl-460:i386 (= 460.32.03-0ubuntu1) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
I tried following the uninstall instructions https://askubuntu.com/questions/940582/upgrade-or-uninstall-cuda-to-allow-apt-get-to-work but was not able to remove the package cleanly due to dependency issues.
'$ sudo dpkg --configure -a'
Setting up libcudnn7 (7.6.5.32-1+cuda10.2) ...
Setting up libnvidia-extra-460:amd64 (460.32.03-0ubuntu1) ...
Setting up libnvidia-common-460 (460.32.03-0ubuntu1) ...
Setting up libcudnn7-dev (7.6.5.32-1+cuda10.2) ...
update-alternatives: using /usr/include/x86_64-linux-gnu/cudnn_v7.h to provide /usr/include/cudnn.h (libcudnn) in auto mode
Setting up libnvidia-fbc1-460:amd64 (460.32.03-0ubuntu1) ...
Setting up nvidia-settings (460.32.03-0ubuntu1) ...
dpkg: dependency problems prevent configuration of libnvidia-ifr1-460:amd64:
libnvidia-ifr1-460:amd64 depends on libnvidia-gl-460; however:
Package libnvidia-gl-460:amd64 is not installed.
dpkg: error processing package libnvidia-ifr1-460:amd64 (--configure):
dependency problems - leaving unconfigured
Setting up libnvidia-compute-460:amd64 (460.32.03-0ubuntu1) ...
Setting up nvidia-kernel-source-460 (460.32.03-0ubuntu1) ...
Setting up nvidia-modprobe (460.32.03-0ubuntu1) ...
Setting up nvidia-utils-460 (460.32.03-0ubuntu1) ...
Setting up nvidia-kernel-common-460 (460.32.03-0ubuntu1) ...
update-initramfs: deferring update (trigger activated)
dpkg: dependency problems prevent configuration of nvidia-driver-460:
nvidia-driver-460 depends on libnvidia-gl-460 (= 460.32.03-0ubuntu1); however:
Package libnvidia-gl-460:amd64 is not installed.
nvidia-driver-460 depends on libnvidia-ifr1-460 (= 460.32.03-0ubuntu1); however:
Package libnvidia-ifr1-460:amd64 is not configured yet.
dpkg: error processing package nvidia-driver-460 (--configure):
dependency problems - leaving unconfigured
Setting up libnvidia-cfg1-460:amd64 (460.32.03-0ubuntu1) ...
dpkg: dependency problems prevent configuration of cuda-drivers-460:
cuda-drivers-460 depends on libnvidia-gl-460 (>= 460.32.03); however:
Package libnvidia-gl-460:amd64 is not installed.
cuda-drivers-460 depends on libnvidia-ifr1-460 (>= 460.32.03); however:
Package libnvidia-ifr1-460:amd64 is not configured yet.
cuda-drivers-460 depends on nvidia-driver-460 (>= 460.32.03); however:
Package nvidia-driver-460 is not configured yet.
dpkg: error processing package cuda-drivers-460 (--configure):
dependency problems - leaving unconfigured
Setting up libnvidia-decode-460:amd64 (460.32.03-0ubuntu1) ...
Setting up nvidia-compute-utils-460 (460.32.03-0ubuntu1) ...
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user
nvidia-persistenced' (UID 111) ... Adding new group
nvidia-persistenced' (GID 115) ...Adding new user
nvidia-persistenced' (UID 111) with group
nvidia-persistenced' ...Not creating home directory `/nonexistent'.
Created symlink /etc/systemd/system/multi-user.target.wants/nvidia-persistenced.service → /lib/systemd/system/nvidia-persistenced.service.
dpkg: dependency problems prevent configuration of cuda-drivers:
cuda-drivers depends on cuda-drivers-460 (= 460.32.03-1); however:
Package cuda-drivers-460 is not configured yet.
dpkg: error processing package cuda-drivers (--configure):
dependency problems - leaving unconfigured
Setting up libnvidia-encode-460:amd64 (460.32.03-0ubuntu1) ...
Setting up xserver-xorg-video-nvidia-460 (460.32.03-0ubuntu1) ...
Setting up nvidia-dkms-460 (460.32.03-0ubuntu1) ...
update-initramfs: deferring update (trigger activated)
A modprobe blacklist file has been created at /etc/modprobe.d to prevent Nouveau
from loading. This can be reverted by deleting the following file:
/etc/modprobe.d/nvidia-graphics-drivers.conf
A new initrd image has also been created. To revert, please regenerate your
initrd by running the following command after deleting the modprobe.d file:
/usr/sbin/initramfs -u
*** Reboot your computer and verify that the NVIDIA graphics driver can ***
*** be loaded. ***
Loading new nvidia-460.32.03 DKMS files...
It is likely that 4.4.0-21318-Microsoft belongs to a chroot's host
Building for 4.15.0-134-generic
Building for architecture x86_64
Building initial module for 4.15.0-134-generic
Done.
nvidia:
Running module version sanity check.
nvidia-modeset.ko:
Running module version sanity check.
nvidia-drm.ko:
Running module version sanity check.
nvidia-uvm.ko:
Running module version sanity check.
depmod...
DKMS: install completed.
dpkg: dependency problems prevent configuration of cuda-runtime-10-2:
cuda-runtime-10-2 depends on cuda-drivers (>= 440.33); however:
Package cuda-drivers is not configured yet.
dpkg: error processing package cuda-runtime-10-2 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cuda-demo-suite-10-2:
cuda-demo-suite-10-2 depends on cuda-runtime-10-2; however:
Package cuda-runtime-10-2 is not configured yet.
dpkg: error processing package cuda-demo-suite-10-2 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cuda-10-2:
cuda-10-2 depends on cuda-runtime-10-2 (>= 10.2.89); however:
Package cuda-runtime-10-2 is not configured yet.
cuda-10-2 depends on cuda-demo-suite-10-2 (>= 10.2.89); however:
Package cuda-demo-suite-10-2 is not configured yet.
dpkg: error processing package cuda-10-2 (--configure):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
Processing triggers for initramfs-tools (0.130ubuntu3.11) ...
Errors were encountered while processing:
libnvidia-ifr1-460:amd64
nvidia-driver-460
cuda-drivers-460
cuda-drivers
cuda-runtime-10-2
cuda-demo-suite-10-2
cuda-10-2
WSL logs:
Expected behavior
I expected that I would be able to install CUDA using WSL2 interface.
Actual behavior
I cannot install cuda toolkit due to dependencies that are not going to be installed or are not installable.
The text was updated successfully, but these errors were encountered: