Package fails to update or install [libnvidia-gl-535 / libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb]

Bug #2025565 reported by ARTHUR HUTAGALUNG
90
This bug affects 18 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-535 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Error while updating nvidia using `sudo apt-get install nvidia-driver-535`

Preparing to unpack .../16-libnvidia-cfg1-535_535.54.03-0ubuntu0.22.04.1_amd64.deb ...
Unpacking libnvidia-cfg1-535:amd64 (535.54.03-0ubuntu0.22.04.1) over (535.54.03-0ubuntu0~gpu22.04.1) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-afPVTz/01-libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Trying `sudo apt-get dist-upgrade` resulting in:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libnvidia-gl-535 : Breaks: libnvidia-gl-535:i386 (!= 535.54.03-0ubuntu0~gpu22.04.1) but 535.54.03-0ubuntu0.22.04.1 is installed
 libnvidia-gl-535:i386 : Breaks: libnvidia-gl-535 (!= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0~gpu22.04.1 is installed
 nvidia-driver-535 : Depends: libnvidia-gl-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0~gpu22.04.1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Trying `sudo apt --fix-broken install` resulting in:

(Reading database ... 203968 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb ...
Unpacking libnvidia-gl-535:amd64 (535.54.03-0ubuntu0.22.04.1) over (535.54.03-0ubuntu0~gpu22.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/nvidia/nvoptix.bin', which is also in package libnvidia-common-535 535.54.03-0ubuntu0~gpu22.04.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: libnvidia-gl-535 535.54.03-0ubuntu0~gpu22.04.1 [modified: usr/share/doc/libnvidia-gl-535/changelog.Debian.gz usr/share/doc/libnvidia-gl-535/copyright]
ProcVersionSignature: Ubuntu 5.19.0-32.33~22.04.1-generic 5.19.17
Uname: Linux 5.19.0-32-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
Date: Sun Jul 2 18:46:11 2023
DuplicateSignature:
 package:libnvidia-gl-535:535.54.03-0ubuntu0~gpu22.04.1 [modified: usr/share/doc/libnvidia-gl-535/changelog.Debian.gz usr/share/doc/libnvidia-gl-535/copyright]
 Unpacking libnvidia-gl-535:amd64 (535.54.03-0ubuntu0.22.04.1) over (535.54.03-0ubuntu0~gpu22.04.1) ...
 dpkg: error processing archive /tmp/apt-dpkg-install-afPVTz/01-libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb (--unpack):
  trying to overwrite '/usr/share/nvidia/nvoptix.bin', which is also in package libnvidia-common-535 535.54.03-0ubuntu0~gpu22.04.1
ErrorMessage: trying to overwrite '/usr/share/nvidia/nvoptix.bin', which is also in package libnvidia-common-535 535.54.03-0ubuntu0~gpu22.04.1
InstallationDate: Installed on 2023-04-06 (86 days ago)
InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223)
Python3Details: /usr/bin/python3.10, Python 3.10.6, python3-minimal, 3.10.6-1~22.04
PythonDetails: /usr/bin/python3.10, Python 3.10.6, python-is-python3, 3.9.2-2
RelatedPackageVersions:
 dpkg 1.21.1ubuntu2.2
 apt 2.4.9
SourcePackage: nvidia-graphics-drivers-535
Title: package libnvidia-gl-535 535.54.03-0ubuntu0~gpu22.04.1 [modified: usr/share/doc/libnvidia-gl-535/changelog.Debian.gz usr/share/doc/libnvidia-gl-535/copyright] failed to install/upgrade: trying to overwrite '/usr/share/nvidia/nvoptix.bin', which is also in package libnvidia-common-535 535.54.03-0ubuntu0~gpu22.04.1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
ARTHUR HUTAGALUNG (uncleqrow) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Cory Albrecht (bytor) wrote :

I get the same error in Ubuntu 22.04 on a Dell XPS 15 2021 model.

Revision history for this message
Cory Albrecht (bytor) wrote :

Can't even install unrelated packages, now.

cory@redbarchetta[19:29:51]~$ sudo apt install libperl-critic-perl
[sudo] password for cory:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libnvidia-gl-535 : Breaks: libnvidia-gl-535:i386 (!= 535.54.03-0ubuntu0~gpu22.04.1) but 535.54.03-0ubuntu0.22.04.1 is to be installed
 libnvidia-gl-535:i386 : Breaks: libnvidia-gl-535 (!= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0~gpu22.04.1 is to be installed
 libperl-critic-perl : Depends: libb-keywords-perl but it is not going to be installed
                       Depends: libfile-which-perl but it is not going to be installed
                       Depends: libmodule-pluggable-perl but it is not going to be installed
                       Depends: libpod-parser-perl but it is not going to be installed
                       Depends: libpod-spell-perl but it is not going to be installed
                       Depends: libppi-perl (>= 1.265) but it is not going to be installed
                       Depends: libppix-quotelike-perl but it is not going to be installed
                       Depends: libppix-regexp-perl (>= 0.068) but it is not going to be installed
                       Depends: libppix-utilities-perl but it is not going to be installed
                       Depends: libreadonly-perl but it is not going to be installed
                       Depends: libstring-format-perl but it is not going to be installed
                       Depends: libtask-weaken-perl but it is not going to be installed
                       Depends: perltidy but it is not going to be installed
 nvidia-driver-535 : Depends: libnvidia-gl-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0~gpu22.04.1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Haven't tried `apt purge *nvidia*` yet to reinstall as there are reports of it not working even with a successful install.

Revision history for this message
User Zero (user0ubuntu) wrote (last edit ):

Same for me:
```
Furthermore run the following command in a Terminal: apt-get install -f
Transaction failed: The package system is broken
 The following packages have unmet dependencies:

libnvidia-gl-535: libnvidia-gl-535:i386: nvidia-driver-535: Depends: libnvidia-gl-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0~gpu22.04.1 is installed
                   Depends: nvidia-kernel-source-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0.22.04.1 is installed
                   Depends: libnvidia-compute-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0.22.04.1 is installed
                   Depends: libnvidia-extra-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0.22.04.1 is installed
                   Depends: nvidia-compute-utils-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0.22.04.1 is installed
                   Depends: libnvidia-decode-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0.22.04.1 is installed
                   Depends: libnvidia-encode-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0.22.04.1 is installed
                   Depends: nvidia-utils-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0.22.04.1 is installed
                   Depends: xserver-xorg-video-nvidia-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0.22.04.1 is installed
                   Depends: libnvidia-cfg1-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0.22.04.1 is installed
                   Depends: libnvidia-fbc1-535 (= 535.54.03-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0.22.04.1 is installed
```

Revision history for this message
Ian Bottomley (kyloe-graves) wrote :

Same here

Identical symptoms to initial post.
Xubuntu 22.04, 1050i, MSI GP72

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-535 (Ubuntu):
status: New → Confirmed
Revision history for this message
sam (samlayssi) wrote :

Any workaround while this gets resolved. Can't login anymore

Revision history for this message
Beau Bouchard (bnb2011) wrote :

Any workarounds for this?

I also get errors every automatic update for the last few days with the same messages

```
Preparing to unpack .../libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb ...
Unpacking libnvidia-gl-535:amd64 (535.54.03-0ubuntu0.22.04.1) over (535.54.03-0ubuntu0~gpu22.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/nvidia/nvoptix.bin', which is also in package libnvidia-common-535 535.54.03-0ubuntu0~gpu22.04.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

```

Ubuntu 22.04, started a few days ago

Beau Bouchard (bnb2011)
summary: - package libnvidia-gl-535 535.54.03-0ubuntu0~gpu22.04.1 [modified:
- usr/share/doc/libnvidia-gl-535/changelog.Debian.gz
- usr/share/doc/libnvidia-gl-535/copyright] failed to install/upgrade:
- trying to overwrite '/usr/share/nvidia/nvoptix.bin', which is also in
- package libnvidia-common-535 535.54.03-0ubuntu0~gpu22.04.1
+ Package fails to update libnvidia-gl-535 / libnvidia-
+ gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb
summary: - Package fails to update libnvidia-gl-535 / libnvidia-
- gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb
+ Package fails to update or install [libnvidia-gl-535 / libnvidia-
+ gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb]
Revision history for this message
Gabriel Nunes (gabrielnunes) wrote :

Same symptoms as the initial post.

Ubuntu 22.04.2 LTS, RTX 2060 Super, nvidia-driver-535

Revision history for this message
ARTHUR HUTAGALUNG (uncleqrow) wrote :

Regarding the breaking dependencies, as was writen in the error stack trace, you may try this:

> sudo apt --fix-broken install

However, there's a chance the broken dependencies may also prevent this from working. In that case, I have tried this solution from the link here:

> https://forums.developer.nvidia.com/t/problem-with-apt-and-nvidia-440-on-ubuntu-20-04/115281/3

That is to try:

> sudo dpkg -i --force-overwrite /var/cache/apt/archives/libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb

And then perform the `--fix-broken install` one.

However, as per what written here:

> https://askubuntu.com/questions/525088/how-to-delete-broken-packages-in-ubuntu

please do notice that it seems the command with `--force-overwrite` is only recommended for linux experts only, and may also break your system further if done incorrectly. So you may opt to do this at your own discretion.

I tried the command with `--force-overwrite`, and it works for my system. But that doesn't necessarily means it will also work on your system as well.

Revision history for this message
User Zero (user0ubuntu) wrote (last edit ):

ARTHUR HUTAGALUNG (uncleqrow) tried your first idea, but didn't helped
```
user0@pc:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libnvidia-gl-535
The following packages will be upgraded:
  libnvidia-gl-535
1 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
16 not fully installed or removed.
Need to get 0 B/202 MB of archives.
After this operation, 144 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 300799 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb ...
Unpacking libnvidia-gl-535:amd64 (535.54.03-0ubuntu0.22.04.1) over (535.54.03-0ubuntu0~gpu22.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/nvidia/nvoptix.bin', which is also in package libnvidia-common-535 535.54.03-0ubuntu0~gpu22.04.
1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
```
is it safe to try second option? Or better try to install nvidia 525?

Revision history for this message
Beau Bouchard (bnb2011) wrote :

Thank You @uncleqrow, Your steps you found seem to be a short term fix.

> sudo dpkg -i --force-overwrite /var/cache/apt/archives/libnvidia-gl-535_535.54.03-0ubuntu0.22.04.1_amd64.deb
> sudo apt --fix-broken install

Outlined in your comment:
> https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-535/+bug/2025565/comments/11
And I checked out the source discussion you linked as well
> https://forums.developer.nvidia.com/t/problem-with-apt-and-nvidia-440-on-ubuntu-20-04/115281/3

Both very helpful

Revision history for this message
Guillaume Doisy (doisyg) wrote :

Same here.
Ubuntu 22.04
Dell XPS 15 9520

Revision history for this message
Davide Prati (lastexxit) wrote :

Same error for me. After giving the command:

sudo apt install nvidia-driver-535

I receive as message:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nvidia-driver-535 : Depends: libnvidia-gl-535 (= 535.86.05-0ubuntu0.22.04.1) but 535.54.03-0ubuntu0.22.04.1 is to be installed
                     Recommends: libnvidia-compute-535:i386 (= 535.86.05-0ubuntu0.22.04.1)
                     Recommends: libnvidia-decode-535:i386 (= 535.86.05-0ubuntu0.22.04.1)
                     Recommends: libnvidia-encode-535:i386 (= 535.86.05-0ubuntu0.22.04.1)
                     Recommends: libnvidia-fbc1-535:i386 (= 535.86.05-0ubuntu0.22.04.1)
                     Recommends: libnvidia-gl-535:i386 (= 535.86.05-0ubuntu0.22.04.1)
E: Unable to correct problems, you have held broken packages.

Any suggestion about how to fix it?

Revision history for this message
Davide Prati (lastexxit) wrote :

Just as info, in case someone else has the same problem. While I was trying to fix the issue, I did:
sudo apt update && sudo apt upgrade -y
and then
sudo apt --fix-broken install
And then I have restarted and I have received a black screen. To fix it:
Boot in recovery mode -> go to networking -> press y to enable networking. Then go to the menu dpkgs, press y to start the fix/upgradre. In my case 27 new packages were installed and some removed.Then (if like in my case, it worked), continue the boot.

It looks like I am using nvidia drivers. This is the output of sudo lshw -c video

  *-display
       description: VGA compatible controller
       product: GP104 [GeForce GTX 1080]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0

Although this not tells me which version. If I check the log /var/log/Xorg.0.log, i see:
[ 27.309] ABI class: X.Org Server Extension, version 10.0
[ 27.427] (==) Matched nouveau as autoconfigured driver 0
[ 27.427] (==) Matched modesetting as autoconfigured driver 1
[ 27.427] (==) Matched fbdev as autoconfigured driver 2
[ 27.427] (==) Matched vesa as autoconfigured driver 3
[ 27.427] (==) Assigned the driver to the xf86ConfigLayout
[ 27.427] (II) LoadModule: "nouveau"
[ 27.427] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so
[ 27.429] (II) Module nouveau: vendor="X.Org Foundation"
[ 27.429] compiled for 1.21.1.3, module version = 1.0.17
[ 27.429] Module class: X.Org Video Driver
[ 27.429] ABI class: X.Org Video Driver, version 25.2

So, it works running the nvidia nouveau drivers 25.2. But for my daily work I need to use the proprietary drivers, as a couple of software don't work.

Revision history for this message
Ian Bottomley (kyloe-graves) wrote (last edit ):

My solution:

So - in desparation, before doing a full re-install, I 'tried a few things'

This seems to have got me free of what looks like some sort of circular dependancy

My actions were

 2004 sudo dpkg --purge libnvidia-gl-535:i386
 2006 sudo dpkg --purge libnvidia-gl-535

One of the two previous commands may be redundant

 2009 sudo apt install libnvidia-gl-535

This did an awful lot of work, installing missing stuff

 2010 sudo apt-get check

Came back clean

Obviously this is just me groping in the dark, but it may help someone

rgds

Ian B.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.