Skip to content
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

Unable to install CUDA in ubuntu docker container #49

Open
Dadiao-shuai opened this issue Sep 28, 2023 · 0 comments
Open

Unable to install CUDA in ubuntu docker container #49

Dadiao-shuai opened this issue Sep 28, 2023 · 0 comments

Comments

@Dadiao-shuai
Copy link

When I use the latest ubuntu22.04/20.04 docker images to create containers, there is always problem to install cuda11.8 which is compatible for my NVIDIA driver 520.61.05.

root@76fa843f6c13:~# apt-get -y install cuda
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cuda : Depends: cuda-12-2 (>= 12.2.2) but it is not going to be installed
 cuda-drivers-520 : Depends: libnvidia-compute-520 (>= 520.61.05) but it is not going to be installed
                    Depends: nvidia-compute-utils-520 (>= 520.61.05) but it is not going to be installed
                    Depends: nvidia-utils-520 (>= 520.61.05) but it is not going to be installed
 libnvidia-decode-520 : Depends: libnvidia-compute-520 (= 520.61.05-0ubuntu1) but it is not going to be installed
 nvidia-driver-520 : Depends: libnvidia-compute-520 (= 520.61.05-0ubuntu1) but it is not going to be installed
                     Depends: nvidia-compute-utils-520 (= 520.61.05-0ubuntu1) but it is not going to be installed
                     Depends: nvidia-utils-520 (= 520.61.05-0ubuntu1) but it is not going to be installed
                     Depends: libnvidia-cfg1-520 (= 520.61.05-0ubuntu1) but it is not going to be installed
                     Recommends: libnvidia-compute-520:i386 (= 520.61.05-0ubuntu1)
                     Recommends: libnvidia-decode-520:i386 (= 520.61.05-0ubuntu1)
                     Recommends: libnvidia-encode-520:i386 (= 520.61.05-0ubuntu1)
                     Recommends: libnvidia-fbc1-520:i386 (= 520.61.05-0ubuntu1)
                     Recommends: libnvidia-gl-520:i386 (= 520.61.05-0ubuntu1)
 xserver-xorg-video-nvidia-520 : Depends: libnvidia-cfg1-520 (= 520.61.05-0ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

BUT WHEN I TRY 'apt --fix-broken install':

root@76fa843f6c13:~# apt-get --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libnvidia-cfg1-520 libnvidia-compute-520 nvidia-compute-utils-520 nvidia-utils-520
The following NEW packages will be installed:
  libnvidia-cfg1-520 libnvidia-compute-520 nvidia-compute-utils-520 nvidia-utils-520
0 upgraded, 4 newly installed, 0 to remove and 8 not upgraded.
705 not fully installed or removed.
Need to get 0 B/51.3 MB of archives.
After this operation, 230 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 file:/var/cuda-repo-ubuntu2004-11-8-local  libnvidia-compute-520 520.61.05-0ubuntu1 [50.6 MB]
Get:2 file:/var/cuda-repo-ubuntu2004-11-8-local  nvidia-compute-utils-520 520.61.05-0ubuntu1 [271 kB]
Get:3 file:/var/cuda-repo-ubuntu2004-11-8-local  nvidia-utils-520 520.61.05-0ubuntu1 [341 kB]
Get:4 file:/var/cuda-repo-ubuntu2004-11-8-local  libnvidia-cfg1-520 520.61.05-0ubuntu1 [87.6 kB]
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 110113 files and directories currently installed.)
Preparing to unpack .../libnvidia-compute-520_520.61.05-0ubuntu1_amd64.deb ...
Unpacking libnvidia-compute-520:amd64 (520.61.05-0ubuntu1) ...
dpkg: error processing archive /var/cuda-repo-ubuntu2004-11-8-local/./libnvidia-compute-520_520.61.05-0ubuntu1_amd64.deb (--unpack):
 unable to make backup link of './usr/lib/x86_64-linux-gnu/libnvidia-ml.so.520.61.05' before installing new version: Invalid cross-device link
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../nvidia-compute-utils-520_520.61.05-0ubuntu1_amd64.deb ...
Unpacking nvidia-compute-utils-520 (520.61.05-0ubuntu1) ...
dpkg: error processing archive /var/cuda-repo-ubuntu2004-11-8-local/./nvidia-compute-utils-520_520.61.05-0ubuntu1_amd64.deb (--unpack):
 unable to make backup link of './usr/bin/nvidia-persistenced' before installing new version: Invalid cross-device link
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../nvidia-utils-520_520.61.05-0ubuntu1_amd64.deb ...
Unpacking nvidia-utils-520 (520.61.05-0ubuntu1) ...
dpkg: error processing archive /var/cuda-repo-ubuntu2004-11-8-local/./nvidia-utils-520_520.61.05-0ubuntu1_amd64.deb (--unpack):
 unable to make backup link of './usr/bin/nvidia-debugdump' before installing new version: Invalid cross-device link
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../libnvidia-cfg1-520_520.61.05-0ubuntu1_amd64.deb ...
Unpacking libnvidia-cfg1-520:amd64 (520.61.05-0ubuntu1) ...
dpkg: error processing archive /var/cuda-repo-ubuntu2004-11-8-local/./libnvidia-cfg1-520_520.61.05-0ubuntu1_amd64.deb (--unpack):
 unable to make backup link of './usr/lib/x86_64-linux-gnu/libnvidia-cfg.so.520.61.05' before installing new version: Invalid cross-device link
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 /var/cuda-repo-ubuntu2004-11-8-local/./libnvidia-compute-520_520.61.05-0ubuntu1_amd64.deb
 /var/cuda-repo-ubuntu2004-11-8-local/./nvidia-compute-utils-520_520.61.05-0ubuntu1_amd64.deb
 /var/cuda-repo-ubuntu2004-11-8-local/./nvidia-utils-520_520.61.05-0ubuntu1_amd64.deb
 /var/cuda-repo-ubuntu2004-11-8-local/./libnvidia-cfg1-520_520.61.05-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant