(4 odpovědi)
Uzavřeno před 4 lety.
Používám Ubuntu 16.04 Xenial desktop, 64 bit, a chtěl jsem nainstalovat openjdk-9-jdk
(vývojová sada Java 9). Verze dostupná z universe
úložiště je 9~b114-0ubuntu1
.
Spuštěním instalačního příkazu se úspěšně nainstalují závislosti (viz níže, včetně balíčku openjdk-9-jdk-headless
), ale samotný požadovaný balíček se nenainstaluje z důvodu souboru poskytovaného uvedenou závislostí, který je také přítomen v problematickém balíčku:
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
Zde je úplný výstup:
$ 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)
Zdá se tedy, že se jedná o chybu způsobenou nesprávným balením, nikoli o chybu na mé straně. Na Launchpadu již také existují nějaké související zprávy o chybách, jako např. tato zpráva, která se zdá být nejdůležitější. Přihlásil jsem se k odběru této zprávy, ale pro Xenial zatím neexistuje žádné řešení.
Související:Nebyl detekován externí pevný disk USB?
Moje otázka zde proto není o této chybě balení , ale jak to obejít a nainstalovat openjdk-9-jdk
přesto ignorovat chybu „pokouším se přepsat soubor“?
Nejlepší odpověď
Můžete přímo provést sudo apt-get -o Dpkg::Options::="--force-overwrite" install openjdk-9-jdk
. Pokud jste zde, již jste vyzkoušeli instalaci bez -o Dpkg::Options::="--force-overwrite"
a víte, které soubory budou tiše přepsány.