LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   My Debian package system is broken (https://www.linuxquestions.org/questions/debian-26/my-debian-package-system-is-broken-4175723261/)

lucmove 03-20-2023 05:43 PM

My Debian package system is broken
 
I wanted to try an application on Debian Stretch and GDebi told me I just needed libdrm2_2.4.75. I had libdrm2_2.4.74-1 but I found libdrm2_2.4.75 in the stretch-backports repository.

So I installed it, it seemed to work, but then Debian complained about the lack of a dependency, libdrm2_2.4.75:i386. I tried to install it, but now I can't install anything because there is some broken dependency:

Code:

(Reading database ... 307298 files and directories currently installed.)
Preparing to unpack libdrm2_2.4.95-1~bpo9+1_amd64.deb ...
De-configuring libdrm2:i386 (2.4.74-1) ...
Unpacking libdrm2:amd64 (2.4.95-1~bpo9+1) over (2.4.74-1) ...
dpkg: error processing package libdrm2:amd64 (--install):
 package libdrm2:amd64 2.4.95-1~bpo9+1 cannot be configured because libdrm2:i386 is at a different version (2.4.74-1)
dpkg: error processing package libdrm2:i386 (--install):
 package libdrm2:i386 2.4.74-1 cannot be configured because libdrm2:amd64 is at a different version (2.4.95-1~bpo9+1)
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Errors were encountered while processing:
 libdrm2:amd64
 libdrm2:i386

Both libdrm2:amd64 and libdrm2:i386 are listed as broken. The big problem is, if I try to remove either one, Synaptic wants to remove some 95% of all my multimedia software. That is unacceptable.

Can I tell Debian to remove those two packages ignoring the whole dependency problem and that I promise to reinstall them just a few seconds later?

artytux 03-20-2023 06:42 PM

You could simply Timeshift back to a snapshot taken before some or all of the changes were made, easy peasy.

frankbell 03-20-2023 08:40 PM

You could also try

Code:

apt-get --fix-broken
or (I've found this more effective) open Synaptic and go to Edit-->Fix Broken.

Let us know what you try and what happens.

(Typo fixed.)

lucmove 03-20-2023 09:12 PM

Quote:

Originally Posted by frankbell (Post 6419090)
You could also try
Code:

apt-get --fix-broken

Code:

# apt-get --fix-broken
E: Command line option --fix-broken is not understood in combination with the other options



Quote:

Originally Posted by frankbell (Post 6419090)
open Synaptic and go to Edit-->Fix Broken.

It says:

Quote:

An error occurred
The following details are provided:
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

uteck 03-20-2023 09:57 PM

Quote:

Debian 9 has been superseded by Debian 10 ("buster"). Security updates have been discontinued as of July 6th, 2020.
You need to upgrade to Debian 10 Buster, https://phoenixnap.com/kb/how-to-upg...bian-10-buster

lucmove 03-21-2023 08:41 AM

I don't want to upgrade, I just want to fix two broken dependencies in an otherwise fully functional system. I used packages from an official repository. There must be some way to fix that mess.

pan64 03-21-2023 10:58 AM

remove what you have installed (all the drm2 packages), run apt install -f and check if that works.
After that you can try to install drm2 again using apt install libdrm2:amd64 libdrm2:i386
But do not install any other version just the one available/recommended by apt.

lucmove 03-21-2023 12:02 PM

Quote:

Originally Posted by pan64 (Post 6419197)
remove what you have installed (all the drm2 packages),

I can't. If I try to remove either one, Synaptic wants to remove some other 100+ packages that I need and cannot reinstall.

pan64 03-21-2023 12:08 PM

do not use synaptic, but dpkg. You can theoretically remove at least one of them.
Another possibility would be to upgrade libdrm2:i386 to 2.4.95-1~bpo9+1 (same as libdrm2:amd64) manually (or something similar).

lucmove 03-21-2023 01:08 PM

OK, I solved the problem this way:

Code:

# dpkg -r --force-all libdrm2:amd64

# dpkg -i libdrm2_2.4.74-1_amd64.deb
(Reading database ... 307296 files and directories currently installed.)
Preparing to unpack libdrm2_2.4.74-1_amd64.deb ...
Unpacking libdrm2:amd64 (2.4.74-1) ...
dpkg: error processing archive libdrm2_2.4.74-1_amd64.deb (--install):
 trying to overwrite shared '/usr/share/doc/libdrm2/changelog.Debian.gz', which is different from other instances of package libdrm2:amd64
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Errors were encountered while processing:
 libdrm2_2.4.74-1_amd64.deb

# apt-get install libdrm2
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following NEW packages will be installed:
  libdrm2
0 upgraded, 1 newly installed, 0 to remove and 161 not upgraded.
2 not fully installed or removed.
Need to get 0 B/36.2 kB of archives.
After this operation, 108 kB of additional disk space will be used.
(Reading database ... 307296 files and directories currently installed.)
Preparing to unpack .../libdrm2_2.4.74-1_amd64.deb ...
Unpacking libdrm2:amd64 (2.4.74-1) ...
dpkg: error processing archive /var/cache/apt/archives/libdrm2_2.4.74-1_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libdrm2/changelog.Debian.gz', which is different from other instances of package libdrm2:amd64
Errors were encountered while processing:
 /var/cache/apt/archives/libdrm2_2.4.74-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

# mv /usr/share/doc/libdrm2 /usr/share/doc/oldlibdrm2
# apt-get install libdrm2
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following NEW packages will be installed:
  libdrm2
0 upgraded, 1 newly installed, 0 to remove and 161 not upgraded.
2 not fully installed or removed.
Need to get 0 B/36.2 kB of archives.
After this operation, 108 kB of additional disk space will be used.
(Reading database ... 307296 files and directories currently installed.)
Preparing to unpack .../libdrm2_2.4.74-1_amd64.deb ...
Unpacking libdrm2:amd64 (2.4.74-1) ...
Setting up initramfs-tools (0.130) ...
update-initramfs: deferring update (trigger activated)
Setting up libdrm2:i386 (2.4.74-1) ...
Setting up libdrm2:amd64 (2.4.74-1) ...

Everything is fixed. Solved.

.

frankbell 03-22-2023 09:43 PM

Thanks for the update. Your post may well help someone else down the line.


All times are GMT -5. The time now is 09:14 PM.