LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-20-2023, 05:43 PM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Rep: Reputation: 110Reputation: 110
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?
 
Old 03-20-2023, 06:42 PM   #2
artytux
Member
 
Registered: Oct 2022
Location: Central Eastcoast Australia
Distribution: EndeavourOS, MXLinux
Posts: 114

Rep: Reputation: 40
You could simply Timeshift back to a snapshot taken before some or all of the changes were made, easy peasy.
 
Old 03-20-2023, 08:40 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,310
Blog Entries: 28

Rep: Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136
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.)

Last edited by frankbell; 03-22-2023 at 09:42 PM.
 
Old 03-20-2023, 09:12 PM   #4
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by frankbell View Post
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 View Post
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
 
Old 03-20-2023, 09:57 PM   #5
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,172

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
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
 
Old 03-21-2023, 08:41 AM   #6
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
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.
 
Old 03-21-2023, 10:58 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,790

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
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.
 
Old 03-21-2023, 12:02 PM   #8
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by pan64 View Post
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.
 
Old 03-21-2023, 12:08 PM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,790

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
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).
 
Old 03-21-2023, 01:08 PM   #10
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
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.

.
 
Old 03-22-2023, 09:43 PM   #11
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,310
Blog Entries: 28

Rep: Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136
Thanks for the update. Your post may well help someone else down the line.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot fix broken package using "sudo apt --fix-broken install" to fix XFCE packages for Zorin OS 16 Core AltFantasy Zorin OS 8 09-25-2021 06:51 AM
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
I broke my package manager / broken package blocks installs [Debian Wheezy] arthoc Linux - Software 4 06-20-2014 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration