J'utilise Ubuntu 16.04 Xenial desktop, 64 bit, et je voulais installer openjdk-9-jdk
(kit de développement Java 9). La version disponible à partir du universe
Le référentiel est 9~b114-0ubuntu1
.
L'exécution de la commande d'installation installe avec succès les dépendances (voir ci-dessous, y compris le package openjdk-9-jdk-headless
), mais ne parvient pas à installer le paquet demandé lui-même à cause d'un fichier fourni par ladite dépendance qui est également présent dans le paquet problématique :
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
Voici le résultat complet :
$ sudo apt install openjdk-9-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
ca-certificates-java libice-dev libpthread-stubs0-dev libsm-dev libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev
libxt-dev openjdk-9-jdk-headless openjdk-9-jre openjdk-9-jre-headless x11proto-core-dev x11proto-input-dev x11proto-kb-dev
xorg-sgml-doctools xtrans-dev
Suggested packages:
libice-doc libsm-doc libxcb-doc libxt-doc openjdk-9-demo openjdk-9-source visualvm icedtea-8-plugin fonts-ipafont-gothic
fonts-ipafont-mincho ttf-wqy-microhei | ttf-wqy-zenhei fonts-indic
The following NEW packages will be installed
ca-certificates-java libice-dev libpthread-stubs0-dev libsm-dev libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev
libxt-dev openjdk-9-jdk openjdk-9-jdk-headless openjdk-9-jre openjdk-9-jre-headless x11proto-core-dev x11proto-input-dev
x11proto-kb-dev xorg-sgml-doctools xtrans-dev
0 to upgrade, 19 to newly install, 0 to remove and 0 not to upgrade.
Need to get 183 MB/187 MB of archives.
After this operation, 326 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ftp.uni-stuttgart.de/ubuntu xenial/main amd64 ca-certificates-java all 20160321 [12,9 kB]
Get:2 http://ftp.uni-stuttgart.de/ubuntu xenial/universe amd64 openjdk-9-jre-headless amd64 9~b114-0ubuntu1 [183 MB]
Get:3 http://ftp.uni-stuttgart.de/ubuntu xenial/universe amd64 openjdk-9-jre amd64 9~b114-0ubuntu1 [51,5 kB]
Fetched 183 MB in 2min 21s (1.293 kB/s)
Selecting previously unselected package ca-certificates-java.
(Reading database ... 210101 files and directories currently installed.)
Preparing to unpack .../ca-certificates-java_20160321_all.deb ...
Unpacking ca-certificates-java (20160321) ...
Selecting previously unselected package openjdk-9-jre-headless:amd64.
Preparing to unpack .../openjdk-9-jre-headless_9~b114-0ubuntu1_amd64.deb ...
Unpacking openjdk-9-jre-headless:amd64 (9~b114-0ubuntu1) ...
Selecting previously unselected package xorg-sgml-doctools.
Preparing to unpack .../xorg-sgml-doctools_1%3a1.11-1_all.deb ...
Unpacking xorg-sgml-doctools (1:1.11-1) ...
Selecting previously unselected package x11proto-core-dev.
Preparing to unpack .../x11proto-core-dev_7.0.28-2ubuntu1_all.deb ...
Unpacking x11proto-core-dev (7.0.28-2ubuntu1) ...
Selecting previously unselected package libice-dev:amd64.
Preparing to unpack .../libice-dev_2%3a1.0.9-1_amd64.deb ...
Unpacking libice-dev:amd64 (2:1.0.9-1) ...
Selecting previously unselected package libpthread-stubs0-dev:amd64.
Preparing to unpack .../libpthread-stubs0-dev_0.3-4_amd64.deb ...
Unpacking libpthread-stubs0-dev:amd64 (0.3-4) ...
Selecting previously unselected package libsm-dev:amd64.
Preparing to unpack .../libsm-dev_2%3a1.2.2-1_amd64.deb ...
Unpacking libsm-dev:amd64 (2:1.2.2-1) ...
Selecting previously unselected package libxau-dev:amd64.
Preparing to unpack .../libxau-dev_1%3a1.0.8-1_amd64.deb ...
Unpacking libxau-dev:amd64 (1:1.0.8-1) ...
Selecting previously unselected package libxdmcp-dev:amd64.
Preparing to unpack .../libxdmcp-dev_1%3a1.1.2-1.1_amd64.deb ...
Unpacking libxdmcp-dev:amd64 (1:1.1.2-1.1) ...
Selecting previously unselected package x11proto-input-dev.
Preparing to unpack .../x11proto-input-dev_2.3.1-1_all.deb ...
Unpacking x11proto-input-dev (2.3.1-1) ...
Selecting previously unselected package x11proto-kb-dev.
Preparing to unpack .../x11proto-kb-dev_1.0.7-0ubuntu1_all.deb ...
Unpacking x11proto-kb-dev (1.0.7-0ubuntu1) ...
Selecting previously unselected package xtrans-dev.
Preparing to unpack .../xtrans-dev_1.3.5-1_all.deb ...
Unpacking xtrans-dev (1.3.5-1) ...
Selecting previously unselected package libxcb1-dev:amd64.
Preparing to unpack .../libxcb1-dev_1.11.1-1ubuntu1_amd64.deb ...
Unpacking libxcb1-dev:amd64 (1.11.1-1ubuntu1) ...
Selecting previously unselected package libx11-dev:amd64.
Preparing to unpack .../libx11-dev_2%3a1.6.3-1ubuntu2_amd64.deb ...
Unpacking libx11-dev:amd64 (2:1.6.3-1ubuntu2) ...
Selecting previously unselected package libx11-doc.
Preparing to unpack .../libx11-doc_2%3a1.6.3-1ubuntu2_all.deb ...
Unpacking libx11-doc (2:1.6.3-1ubuntu2) ...
Selecting previously unselected package libxt-dev:amd64.
Preparing to unpack .../libxt-dev_1%3a1.1.5-0ubuntu1_amd64.deb ...
Unpacking libxt-dev:amd64 (1:1.1.5-0ubuntu1) ...
Selecting previously unselected package openjdk-9-jre:amd64.
Preparing to unpack .../openjdk-9-jre_9~b114-0ubuntu1_amd64.deb ...
Unpacking openjdk-9-jre:amd64 (9~b114-0ubuntu1) ...
Selecting previously unselected package openjdk-9-jdk-headless:amd64.
Preparing to unpack .../openjdk-9-jdk-headless_9~b114-0ubuntu1_amd64.deb ...
Unpacking openjdk-9-jdk-headless:amd64 (9~b114-0ubuntu1) ...
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
Processing triggers for ca-certificates (20160104ubuntu1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.15-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)
Il semble donc qu'il s'agisse d'un bug causé par un emballage incorrect et non d'une faute de ma part. Il y a également des rapports de bogue connexes sur Launchpad déjà, comme par ex. ce rapport qui semble être le plus important . J'ai souscrit à ce rapport, mais il n'y a pas encore de solution pour Xenial.
Par conséquent, ma question est la suivante pas sur ce bug d'emballage pero comment contourner ce problème et installer openjdk-9-jdk
de toute façon, en ignorant l'erreur "trying to overwrite file" ?