apt update - ignoring a specific package?

cjxzjcxzjz

New Member
Joined
Mar 24, 2020
Messages
11
Reaction score
2
Credits
102
I want to update a machine with sudo apt update && sudo apt upgrade. This command fails because of a package error:
[..]
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
openjdk-8-jre-headless : Breaks: openjdk-8-jre-headless:i386 (!= 8u312-b07-0ubuntu1~20.04) but 8u342-b07-0ubuntu1~20.04 is installed
openjdk-8-jre-headless:i386 : Breaks: openjdk-8-jre-headless (!= 8u342-b07-0ubuntu1~20.04) but 8u312-b07-0ubuntu1~20.04 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
[..]
I don't have time to fix this now so I want to ignore the package. For this I'm using: apt list --upgradable
[..]
login/focal-updates 1:4.8.1-1ubuntu5.20.04.2 amd64 [upgradable from: 1:4.8.1-1ubuntu5.20.04.1]
openjdk-11-jdk-headless/focal-updates,focal-security 11.0.16+8-0ubuntu1~20.04 amd64 [upgradable from: 11.0.15+10-0ubuntu0.20.04.1]
openjdk-11-jdk/focal-updates,focal-security 11.0.16+8-0ubuntu1~20.04 amd64 [upgradable from: 11.0.15+10-0ubuntu0.20.04.1]
openjdk-11-jre-headless/focal-updates,focal-security 11.0.16+8-0ubuntu1~20.04 amd64 [upgradable from: 11.0.15+10-0ubuntu0.20.04.1]
openjdk-11-jre/focal-updates,focal-security 11.0.16+8-0ubuntu1~20.04 amd64 [upgradable from: 11.0.15+10-0ubuntu0.20.04.1]
openjdk-8-jre-headless/focal-updates,focal-security 8u342-b07-0ubuntu1~20.04 amd64 [upgradable from: 8u312-b07-0ubuntu1~20.04]
openssh-client/focal-updates 1:8.2p1-4ubuntu0.5 amd64 [upgradable from: 1:8.2p1-4ubuntu0.4]
[..]
And then use: sudo apt-mark hold openjdk-8-jre-headless && sudo apt-mark hold openjdk-8-jre-headless:i386
openjdk-8-jre-headless set on hold.
openjdk-8-jre-headless:i386 set on hold.
After this, I run sudo apt update && sudo apt upgrade again but the same error pops up. How can I get apt to ignore these packages so I can update the system?

Thanks in advance.
 


Lord Boltar

Well-Known Member
Joined
Nov 24, 2020
Messages
1,805
Reaction score
1,216
Credits
13,436
Here is your problem -
openjdk-8-jre-headless : Breaks: openjdk-8-jre-headless:i386 (!= 8u312-b07-0ubuntu1~20.04) but 8u342-b07-0ubuntu1~20.04 is installed
openjdk-8-jre-headless:i386 : Breaks: openjdk-8-jre-headless (!= 8u342-b07-0ubuntu1~20.04) but 8u312-b07-0ubuntu1~20.04 is installed
This is a version mismatch - you will have to remove openjdk-8-jre-headless:i386 from your system first - then run
Code:
sudo apt-mark hold openjdk-8-jre-headless

Also I do not think OpenJDK 8 is available any longer at least it is not available in Debian 11 Repos[/code]
 
Last edited:
OP
C

cjxzjcxzjz

New Member
Joined
Mar 24, 2020
Messages
11
Reaction score
2
Credits
102
Here is your problem -
openjdk-8-jre-headless : Breaks: openjdk-8-jre-headless:i386 (!= 8u312-b07-0ubuntu1~20.04) but 8u342-b07-0ubuntu1~20.04 is installed
openjdk-8-jre-headless:i386 : Breaks: openjdk-8-jre-headless (!= 8u342-b07-0ubuntu1~20.04) but 8u312-b07-0ubuntu1~20.04 is installed
This is a version mismatch - you will have to remove openjdk-8-jre-headless:i386 from your system first - then run
Code:
[B]sudo apt-mark hold openjdk-8-jre-headless[/code[/B]

Also I do not think OpenJDK 8 is available any longer at least it is not available in Debian 11 Repos
Yes I saw that, that's why I tried to set it on hold. I thought setting it on hold would let apt ignore it and not try to update it so I can update the rest of the system. Is that a wrong assumption?
 

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
2,863
Reaction score
1,855
Credits
21,369
in the 60 mins you have had this post up, you could have run apt --fix-broken as the report suggested
 

Lord Boltar

Well-Known Member
Joined
Nov 24, 2020
Messages
1,805
Reaction score
1,216
Credits
13,436
My guess is when they run
Code:
sudo apt --fix-broken
the will get an error something like
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) and nothing will get fixed - just a guess on my part
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
4,798
Reaction score
4,111
Credits
27,605
"You might want to run 'apt --fix-broken install' to correct these."

as @Brickwizard said...it is worth a shot.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top