Installation failure for openjdk-9 on 16.04 ("trying to overwrite jawt_md.h")

Bug #1593191 reported by Simos Xenitellis 
64
This bug affects 14 people
Affects Status Importance Assigned to Milestone
openjdk-9 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When installing "openjdk-9-jdk" on Ubuntu 16.04, the installation fails:

# apt install openjdk-9-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  openjdk-9-demo openjdk-9-source visualvm
The following NEW packages will be installed:
  openjdk-9-jdk
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
127 not fully installed or removed.
Need to get 0 B/16.6 kB of archives.
After this operation, 58.4 kB of additional disk space will be used.
(Reading database ... 28839 files and directories currently installed.)
Preparing to unpack .../openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb ...
Unpacking openjdk-9-jdk:amd64 (9~b114-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/jvm/java-9-openjdk-amd64/include/linux/jawt_md.h', which is also in package openjdk-9-jdk-headless:amd64 9~b114-0ubuntu1
Errors were encountered while processing:
 /var/cache/apt/archives/openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

It appears to be a packaging issue; both openjdk-9-jdk and openjdk-9-jdk-headless provide the same file /usr/lib/jvm/java-9-openjdk-amd64/include/linux/jawt_md.h

As a result, it is not possible to install "openjdk-9-jdk" on Ubuntu 16.04.

Revision history for this message
Simos Xenitellis  (simosx) wrote :

The failure is reproducible. For example,

$ lxc launch ubuntu:x mytest
$ lxc exec mytest -- /bin/bash
# apt update
# apt upgrade
# apt install openjdk-9-jdk
(above error occurs).

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

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

Changed in openjdk-9 (Ubuntu):
status: New → Confirmed
Revision history for this message
Jeffrey Walton (noloader) wrote :

Bump...

Reported at https://askubuntu.com/questions/769467/can-not-install-openjdk-9-jdk-because-it-tries-to-overwrite-file-aready-includ, too.

Still a problem on the latest Ubuntu machines (fully patched):

   $ lsb_release -a
   No LSB modules are available.
   Distributor ID: Ubuntu
   Description: Ubuntu 16.04.4 LTS
   Release: 16.04
   Codename: xenial

And:

   $ sudo apt-get install openjdk-9-jdk
   Reading package lists... Done
   Building dependency tree
   Reading state information... Done
   Suggested packages:
     openjdk-9-demo openjdk-9-source visualvm
   The following NEW packages will be installed:
     openjdk-9-jdk
   0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
   12 not fully installed or removed.
   Need to get 0 B/16.6 kB of archives.
   After this operation, 58.4 kB of additional disk space will be used.
   (Reading database ... 198589 files and directories currently installed.)
   Preparing to unpack .../openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb ...
   Unpacking openjdk-9-jdk:amd64 (9~b114-0ubuntu1) ...
   dpkg: error processing archive /var/cache/apt/archives/openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb (--unpack):
    trying to overwrite '/usr/lib/jvm/java-9-openjdk-amd64/include/linux/jawt_md.h', which is also in package openjdk-9-jdk-headless:amd64 9~b114-0ubuntu1
   Errors were encountered while processing:
    /var/cache/apt/archives/openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb
   E: Sub-process /usr/bin/dpkg returned an error code (1)

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.