Can’t re-install Nvidia Drivers on Ubuntu20.04 after Purging nvidia-*

sliu135

New Member
Joined
Jul 5, 2022
Messages
1
Reaction score
0
Credits
51
I recently purged nvidia-driver(sudo apt-get remove --purge '^nvidia-.*') as it conflicts with the app I wanted to try. Now I want to re-install the driver so that I can run GUI in my docker container. Before I did anything, I run dpkg -l | grep -i nvidia, and it gives the following

```
ii libnvidia-cfg1-515:amd64 515.48.07-0ubuntu0.20.04.2 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-515 515.48.07-0ubuntu0.20.04.2 all Shared files used by the NVIDIA libraries
rc libnvidia-compute-460:amd64 470.129.06-0ubuntu0.20.04.1 amd64 Transitional package for libnvidia-compute-470
rc libnvidia-compute-470:amd64 470.129.06-0ubuntu0.20.04.1 amd64 NVIDIA libcompute package
rc libnvidia-compute-510:amd64 510.73.05-0ubuntu0.20.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-515:amd64 515.48.07-0ubuntu0.20.04.2 amd64 NVIDIA libcompute package
ii libnvidia-compute-515:i386 515.48.07-0ubuntu0.20.04.2 i386 NVIDIA libcompute package
ii libnvidia-decode-515:amd64 515.48.07-0ubuntu0.20.04.2 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-515:i386 515.48.07-0ubuntu0.20.04.2 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-515:amd64 515.48.07-0ubuntu0.20.04.2 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-515:i386 515.48.07-0ubuntu0.20.04.2 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-515:amd64 515.48.07-0ubuntu0.20.04.2 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-515:amd64 515.48.07-0ubuntu0.20.04.2 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-515:i386 515.48.07-0ubuntu0.20.04.2 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-515:amd64 515.48.07-0ubuntu0.20.04.2 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-515:i386 515.48.07-0ubuntu0.20.04.2 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii screen-resolution-extra 0.18build1 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-515 515.48.07-0ubuntu0.20.04.2 amd64 NVIDIA binary Xorg driver
```

with `sudo apt update`, `sudo apt upgrade`, and `sudo apt autoremove` running fine, no pkg listed above shows up afterwards. I reinstall the driver by using `sudo apt install nvidia-driver-515`. The last several lines of the outputs are the following:
```
dpkg: dependency problems prevent configuration of nvidia-driver-515:
nvidia-driver-515 depends on nvidia-dkms-515 (<= 515.48.07-1); however:
Package nvidia-dkms-515 is not configured yet.
nvidia-driver-515 depends on nvidia-dkms-515 (>= 515.48.07); however:
Package nvidia-dkms-515 is not configured yet.

dpkg: error processing package nvidia-driver-515 (--configure):
dependency problems - leaving unconfigured
Setting up libxcb-dri2-0:i386 (1.14-2) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up vdpau-driver-all:amd64 (1.3-1ubuntu2) ...
Setting up libxcb-randr0:i386 (1.14-2) ...
Setting up libnvidia-gl-515:amd64 (515.48.07-0ubuntu0.20.04.2) ...
Setting up libx11-6:i386 (2:1.6.9-2ubuntu1.2) ...
Setting up libxcb-dri3-0:i386 (1.14-2) ...
Setting up mesa-vulkan-drivers:i386 (21.2.6-0ubuntu0.1~20.04.2) ...
Setting up libgl1-mesa-dri:i386 (21.2.6-0ubuntu0.1~20.04.2) ...
Setting up libxext6:i386 (2:1.3.4-0ubuntu1) ...
Setting up libxxf86vm1:i386 (1:1.1.4-1build1) ...
Setting up libxfixes3:i386 (1:5.0.3-2) ...
Setting up libnvidia-decode-515:i386 (515.48.07-0ubuntu0.20.04.2) ...
Setting up libnvidia-gl-515:i386 (515.48.07-0ubuntu0.20.04.2) ...
Setting up libglx-mesa0:i386 (21.2.6-0ubuntu0.1~20.04.2) ...
Setting up libglx0:i386 (1.3.2-1~ubuntu0.20.04.2) ...
Setting up libgl1:i386 (1.3.2-1~ubuntu0.20.04.2) ...
Setting up libnvidia-encode-515:i386 (515.48.07-0ubuntu0.20.04.2) ...
Setting up libnvidia-fbc1-515:i386 (515.48.07-0ubuntu0.20.04.2) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.14.0-1042-oem
Errors were encountered while processing:
nvidia-dkms-515
nvidia-driver-515
E: Sub-process /usr/bin/dpkg returned an error code (1)
```
I tried to re-install the drivers of older versions, but didn’t succeed. As for the card info, the output of `lspci | grep VGA` is
```
0000:17:00.0 VGA compatible controller: NVIDIA Corporation Device 2230 (rev a1)
0000:73:00.0 VGA compatible controller: NVIDIA Corporation Device 2230 (rev a1)
```
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top