Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

  1. #1
    Join Date
    Jan 2024
    Beans
    14

    CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    Hi all,

    My ultimate objective is to get cuda 12.1.1 (or 12.1) installed for use with Anaconda3's Python. I have two qualified laptops (Core i7s w/32 GB, Quadro P2000s) that I've been ping-ponging between with clean installs of Ubuntu 22.04 LTS and have had various difficulties just getting the environment to work. The order in which Anaconda and cuda are installed seems to affect which errors are manifest but I'll just focus on the current attempt with is to install cuda after Anaconda3.

    It seems that to get cuda to work with python, the current limitation is version 12.1 for cuda (as opposed to 12.3 that is otherwise available) which comes with the 530 version of the video drivers for the Nvidia chip. I know the computer should be cuda capable since an earlier attempt where I tried to install cuda first (but before I knew about the version limit for python), I installed cuda 12.3 first with the 545 video driver and it seemed to work okay. At least, the cuda package installed, the video driver installed and was displayed in the "About" system setting and some of the cuda samples executed. However, Anaconda didn't link in and I attribute it to Anaconda's python incompatibility with 12.3 cuda.

    So, now to the current attempt. I followed the instructions on

    https://developer.nvidia.com/cuda-12...type=deb_local

    Previously, I had followed the detailed instructions in nvidia's detailed docs (https://docs.nvidia.com/cuda/cuda-in...nux/index.html) in the instructions but a) there are many extraneous features I don't think I need, at least yet, b) the instructions for 12.1 eventually feed you back to the instructions for 12.3 and c) once you've done this 2 or 6 times , you're apt to strip this down to the minimum to minimize the BS to "is this going to work or not" level. Getting this down to the minimum for 12.1 after Anaconda3 has been installed, on the very last instruction, i.e.

    sudo apt-get -y install cuda

    the following results where the gist seems to be that package dependencies prevent the last package set (pasted in at the bottom) are prevented from being processed. Various attempts at fixing this don't work so please don't suggest "apt --fix-broken install" as that won't work. I've searched various fixes and they don't work and that's really not what I'm looking for. I can strip this back to the bare bones and get back to the base install. And I can use the other machine to get back to a bare install. I'm looking for a way to get either cuda 12.1 to install and work with anaconda3 or do I need to backlevel to an earlier version of Ubunta, or cuda (or last option python). I need to get to my ultimate objectve eventually. Thanks to all in advance who can offer insight.

    -Rocky714

    dpkg: dependency problems prevent configuration of nvidia-driver-530:
    nvidia-driver-530 depends on nvidia-dkms-530 (= 530.30.02-0ubuntu1); however:
    Package nvidia-dkms-530 is not configured yet.

    dpkg: error processing package nvidia-driver-530 (--configure):
    dependency problems - leaving unconfigured
    Setting up libcublas-dev-12-1 (12.1.3.1-1) ...
    No apport report written because the error message indicates its a followup error from a previous failure.
    dpkg: dependency problems prevent configuration of cuda-drivers:
    cuda-drivers depends on cuda-drivers-530 (= 530.30.02-1); however:
    Package cuda-drivers-530 is not configured yet.

    dpkg: error processing package cuda-drivers (--configure):
    dependency problems - leaving unconfigured
    Setting up cuda-opencl-dev-12-1 (12.1.105-1) ...
    No apport report written because MaxReports is reached already
    Setting up cuda-libraries-dev-12-1 (12.1.1-1) ...
    dpkg: dependency problems prevent configuration of cuda-runtime-12-1:
    cuda-runtime-12-1 depends on cuda-drivers (>= 530.30.02); however:
    Package cuda-drivers is not configured yet.

    dpkg: error processing package cuda-runtime-12-1 (--configure):
    dependency problems - leaving unconfigured
    Setting up cuda-visual-tools-12-1 (12.1.1-1) ...
    No apport report written because MaxReports is reached already
    dpkg: dependency problems prevent configuration of cuda-12-1:
    cuda-12-1 depends on cuda-runtime-12-1 (>= 12.1.1); however:
    Package cuda-runtime-12-1 is not configured yet.

    dpkg: error processing package cuda-12-1 (--configure):
    dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of cuda:
    cuda depends on cuda-12-1 (>= 12.1.1); however:
    Package cuda-12-1 is not configured yet.

    dpkg: error processing package cuda (--configure):
    dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of cuda-demo-suite-12-1:
    cuda-demo-suite-12-1 depends on cuda-runtime-12-1; however:
    Package cuda-runtime-12-1 is not configured yet.

    dpkg: error processing package cuda-demo-suite-12-1 (--configure):
    dependency problems - leaving unconfigured
    No apport report written because MaxReports is reached already
    No apport report written because MaxReports is reached already
    No apport report written because MaxReports is reached already
    Setting up cuda-tools-12-1 (12.1.1-1) ...
    Setting up cuda-toolkit-12-1 (12.1.1-1) ...
    Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
    Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
    Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
    Processing triggers for man-db (2.10.2-1) ...
    Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
    Processing triggers for initramfs-tools (0.140ubuntu13.4) ...
    update-initramfs: Generating /boot/initrd.img-6.5.0-15-generic
    Errors were encountered while processing:
    nvidia-dkms-530
    cuda-drivers-530
    nvidia-driver-530
    cuda-drivers
    cuda-runtime-12-1
    cuda-12-1
    cuda
    cuda-demo-suite-12-1
    E: Sub-process /usr/bin/dpkg returned an error code (1)

  2. #2
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    I skimmed though it. TL;DR. At least not all the details.

    Why not try with nvidia-driver-535? I feel like that would satisfy a lot of those dependency issues.

    545 is not stable yet for Linux. I have a friend who is helping test the Linux patches for 545... So I have sort of an inside track on that. 530 is not used much. 535 is stable and working great, especially with Cuda 12 and newer.

    More important, look at this post for upgrading your gcc and g++ compilers to version 12. If on 22.04.3, the compiler is gcc-11.4 and the kernel for 6.5.0-14 was compiled with gcc-12. I'm surprised you haven't hit that error yet as explicitly named, but that is part of that eror.
    RE: https://ubuntuforums.org/showthread....4#post14175164

    Just saying.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  3. #3
    Join Date
    Jan 2024
    Beans
    14

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    I tried 535 after getting the above posted result hoping that it would bypass too-old revisions. It didn't fix anything. I'm not sure how to install 535 with 12.1 CUDA independently since the package (.deb) comes with 530 as part of the package.

    I'll check the versions of the compilers but updates were part of the install process so I'm pretty sure they're up-to-date. But I'll double check.

    -Rocky714

  4. #4
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    I started this thread: https://ubuntuforums.org/showthread.php?t=2494834

    And filed this bug report: https://bugs.launchpad.net/ubuntu/+s...s/+bug/2051457

    ...to try to get a fix pushed through the normal updates channel with this. I would appreciate and I think it would be in all of our best interest to join that bug "I am also affected" so we can add some weight to getting this resolved.

    I agree that we shouldn't need a "work-around" to make make this work.
    Code:
    mafoelffen@msi-ubuntu:~$ nvidia-smi
    Sun Jan 28 12:19:44 2024       
    +---------------------------------------------------------------------------------------+
    | NVIDIA-SMI 535.154.05             Driver Version: 535.154.05   CUDA Version: 12.2     |
    |-----------------------------------------+----------------------+----------------------+
    | GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
    |                                         |                      |               MIG M. |
    |=========================================+======================+======================|
    |   0  NVIDIA GeForce GTX 1660 Ti     Off | 00000000:01:00.0  On |                  N/A |
    |  0%   32C    P8               8W / 130W |    125MiB /  6144MiB |      2%      Default |
    |                                         |                      |                  N/A |
    +-----------------------------------------+----------------------+----------------------+
                                                                                             
    +---------------------------------------------------------------------------------------+
    | Processes:                                                                            |
    |  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
    |        ID   ID                                                             Usage      |
    |=======================================================================================|
    |    0   N/A  N/A      4568      G   /usr/lib/xorg/Xorg                           84MiB |
    |    0   N/A  N/A      5366      G   /usr/bin/gnome-shell                         29MiB |
    |    0   N/A  N/A     12469      G   ...irefox/3728/usr/lib/firefox/firefox        8MiB |
    +---------------------------------------------------------------------------------------+
    Cuda, with mine, I already had the 535 driver installed before I installed Cuda. So it already saw that the driver version or newer was there. Once it saw that was there, it didn't try to reinstall the video driver = it skipped that step. But the Cuda version of mine is 12.2...
    Last edited by MAFoElffen; January 28th, 2024 at 09:25 PM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  5. #5
    Join Date
    Mar 2011
    Beans
    1,994

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    I gave up on Nvidia's CUDA deb installation awhile back -- when a normal video driver update wanted to delete all the CUDA files! Totally messed up dependencies. Get your system running with your (latest?) selected video driver, then use Nvidia's .run script. Now a 1GB+ script is not something I can look at nor would run as root, and since the only functionality I want is to copy some files around, I run it as a user, and see where it fails. It wants to write into /usr/local/cudaxxx, but even if I make the directory owned and writable by a user, it still fails trying to unnecessarily create the dir. OK as root, change the ownership of /usr/local to the user, then the script is happy (remember to change it back). Reject the offer of the unwanted version of the video driver, which should already be installed and working. Under the options, override all the system areas the script thinks it needs to write into -- use the /usr/local/cudaxxx/lib and /usr/local/cudaxxx/bin areas instead. I ignore the icons the script wants to write into /usr/share too -- never needed them. The full CUDA install for you selected version will now be under /usr/local/cuda-12.1 (or whatever version you selected). Other CUDA versions may also be installed without problems. The PATH and LD_LIBRARY_PATH modifications will select which CUDA version you are working with. See:
    https://askubuntu.com/questions/1077...077063#1077063
    https://askubuntu.com/questions/1219...244010#1244010

    The standard repos have a CUDA install, but you cannot pick a specific version. I've never actually used that method since I generally had version requirements imposed by other software.

  6. #6
    Join Date
    Jan 2024
    Beans
    14

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    Thanks, MAFoElffen. I'd be happy to add my name to support the urgency of addressing this bug. In the interest of expediency, however, (and I'm sorry if this is a stupid question), but based on your experience, is your expectation that installing the 535 drivers first will allow cuda 12.1 toolkit to install and setup properly? I know you can't be certain but a guess is acceptable at this point. I can't use cuda 12.2 because python and pytorch and torchvision is not yet compatible with those versions. Thanks.

    -rocky714
    Last edited by rocky714; January 29th, 2024 at 04:42 AM.

  7. #7
    Join Date
    Jan 2024
    Beans
    14

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    Thanks, ubfan1. I'll try your solution if I can't get MAFoElffen's suggestion to work. (Man, I've got alot *more* work to do. This is way harder than it ought to be).

    -rocky714

  8. #8
    Join Date
    Mar 2011
    Beans
    1,994

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    Yes, my current latest CUDA is 12.1, and it was installed after the Nvidia driver which was current at the time. Every few releases I install the latest CUDA, and maybe delete an old one, keeping a few cuda releases around. The CUDA installs with all the CUDA files collected under the /usr/local/cudaxxx always work. The only issue with running CUDA is the occasional mixup of the laptop source/sink providers (xrandr --listproviders). When that happens, and I'm not sure why it does sometimes, the manual fix is to set two env variables before running a program:
    __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia <progtorun>

  9. #9
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    Yes, follow ubfan1's suggestions. Same as mine, as i had the video driver installed first. I have Cuda 12.2 on mine. His is running 12.1, which is what you want to run.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  10. #10
    Join Date
    Jan 2024
    Beans
    14

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    This may be alarmist but I don't think it because I remember this as an error that came up prior to a cascade of problems that followed. This was the simple set of steps followed: a fresh install of Ubuntu 22.04 LTS with an update as prompted since "there have been updates since this install". The only other step taken was customizing FIrefox. Then, I installed nvidia driver 535 with the command

    sudo apt install nvidia-driver-535 nvidia-dkms-535

    The driver seemed to install (i.e., it went through the motions) but did not come up ("About" still shows "llvmpipe (LLVM 15.0.7 256 bits)" install of the Nvidia driver. Issuing the "sudo apt-get upgrade" command yields the below message. A couple of packages are held back. Numerous errors follow when I've seen that before. Autoremove doesn't do anything either, but problems will follow, I assure you. Any recommendations? Again, thanks in advance for the help.

    -Rocky714

    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Calculating upgrade... Done
    The following packages have been kept back:
    gjs libgjs0g
    0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •