trying to overwrite shared '/etc/java-8-openjdk/security/java.security', which is different from other instances of package openjdk-8-jre-headless:i386 on Ubuntu 20.04

Bug #1890592 reported by Valentyna
72
This bug affects 12 people
Affects Status Importance Assigned to Milestone
openjdk-8 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I`am unable to install openjdk-8-jre-headless:i386 on Ubuntu 20.04.
My OS:
lsb_release -rd
Description: Ubuntu 20.04.1 LTS
Release: 20.04

I get an error:
apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  openjdk-8-jre-headless:i386
Suggested packages:
  libnss-mdns:i386 fonts-ipafont-gothic:i386 fonts-ipafont-mincho:i386 fonts-wqy-microhei:i386 fonts-wqy-zenhei:i386
The following packages will be upgraded:
  openjdk-8-jre-headless:i386
1 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
3 not fully installed or removed.
Need to get 0 B/27.1 MB of archives.
After this operation, 26.6 kB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 247995 files and directories currently installed.)
Preparing to unpack .../openjdk-8-jre-headless_8u265-b01-0ubuntu2~20.04_i386.deb ...
Unpacking openjdk-8-jre-headless:i386 (8u265-b01-0ubuntu2~20.04) over (8u252-b09-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/openjdk-8-jre-headless_8u265-b01-0ubuntu2~20.04_i386.deb (--unpack):
 trying to overwrite shared '/etc/java-8-openjdk/security/java.security', which is different from other instances of package openjdk-8-jre-headless:i386
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/openjdk-8-jre-headless_8u265-b01-0ubuntu2~20.04_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I think the reason is in difference of /etc/java-8-openjdk/security/java.security file in 32-bit and 64-bit package. String org.GNOME.Accessibility.,\ exists in 64-bit package, but doesn`t exist in 32-bit package.

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

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

Changed in openjdk-8 (Ubuntu):
status: New → Confirmed
Revision history for this message
Sam Volojiy (svolo) wrote :

This bug is rearing it's ugly head on more 20.04 installs with JDK 8 trying to upgrade to the latest

Revision history for this message
Sam Volojiy (svolo) wrote :

Tired of waiting for the distro owners to fix it, I forced the overwrite, which solved the issue and made apt is usable again:

`sudo dpkg --configure --force-overwrite -a`

Alternatively:

`sudo apt -o Dpkg::Options::="--force-overwrite" --fix-broken install`

This issue seem to be related from the conflict between the OpenJDK and Oracle's own DEB distributions for Focal, especially if you've used the webupd8 PPA in the past. There are more details on this bug report - https://bugs.launchpad.net/ubuntu/+source/openjdk-8/+bug/1806265

Revision history for this message
Przemek K. (azrael) wrote :

I had a similar problem, but solved it by removing all JRE8 packages and leaving only JRE11.
azrael@leetbook:~$ LANG=C wajig fix-install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  openjdk-8-jre-headless
Suggested packages:
  fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei fonts-wqy-zenhei
The following packages will be upgraded:
  openjdk-8-jre-headless
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/28.2 MB of archives.
After this operation, 16.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 380693 files and directories currently installed.)
Preparing to unpack .../openjdk-8-jre-headless_8u282-b08-0ubuntu1~20.04_amd64.deb ...
Unpacking openjdk-8-jre-headless:amd64 (8u282-b08-0ubuntu1~20.04) over (8u275-b01-0ubuntu1~20.04) ...
dpkg: error processing archive /var/cache/apt/archives/openjdk-8-jre-headless_8u282-b08-0ubuntu1~20.04_amd64.deb (--unpack):
 trying to overwrite shared '/etc/java-8-openjdk/accessibility.properties', which is different from other instances of package openjdk-8-jre-headless:amd64
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/openjdk-8-jre-headless_8u282-b08-0ubuntu1~20.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
azrael@leetbook:~$ wajig list-installed |egrep 'jdk|jre'
default-jre
default-jre-headless
openjdk-11-jre:amd64
openjdk-11-jre-headless:amd64
openjdk-8-jre:i386
openjdk-8-jre-headless:amd64
openjdk-8-jre-headless:i386

Valentyna (valia0906)
tags: added: focal jammy
Revision history for this message
Valentyna (valia0906) wrote :

The problem also exists on Ubuntu 22.04 sine version 8u342-b07-0ubuntu1~22.04.
In version 8u312-b07-0ubuntu1 everything works fine.

Revision history for this message
Thorsten Glaser (mirabilos) wrote :

duplicate of https://bugs.launchpad.net/ubuntu/+source/openjdk-8/+bug/1916327 (different filename but same root cause)

Changed in openjdk-8 (Ubuntu):
status: Confirmed → Invalid
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.