I wanted to install Java Development Kit 8 with deb file converted from rpm with Alien.

QApt said the installation is complete, but package jdk1.8.0-111 is just half-installed. It blocks all installation with apt and dpkg, even forced.

This is what I get after executing commands to install something with apt:

matj1@matj1-Lenovo-G565:~$ sudo apt upgrade
Načítají se seznamy balíků… Hotovo
Vytváří se strom závislostí
Načítají se stavové informace… Hotovo
E: Balík jdk1.8.0-111 je potřeba přeinstalovat, ale nemohu pro něj nalézt archiv.

The last line of output means package jdk1.8.0-111 needs to be reinstalled, but it can't find an archive for it.

After executing sudo dpkg --remove --force-remove-reinstreq --dry-run jdk1.8.0-111, in the output is dpkg: warning: package is in a very bad inconsistent state; you should reinstall it before attempting a removal and reinstalling from the deb file doesn't help. Reinstalling with apt or dpkg doesn't work, as I wrote above.

This is info about the package from apt-cache:

matj1@matj1-Lenovo-G565:~$ apt-cache show jdk1.8.0-111
Package: jdk1.8.0-111
Status: install reinstreq half-installed
Priority: extra
Section: alien
Installed-Size: 265842
Maintainer: matj1 <matj1@matj1-Lenovo-G565>
Architecture: amd64
Version: 1.8.0111-1
 /usr/java/jdk1.8.0_111/.java/.systemPrefs/.system.lock d41d8cd98f00b204e9800998ecf8427e
 /usr/java/jdk1.8.0_111/.java/.systemPrefs/.systemRootModFile d41d8cd98f00b204e9800998ecf8427e
 /usr/java/jdk1.8.0_111/.java/init.d/jexec 3a4104cd0a34b5e7e55433a78d9f7721                   
 /usr/java/jdk1.8.0_111/jre/lib/charsets.pack 43fd4018caf9d70b0156ba71a2deddc1                
 /usr/java/jdk1.8.0_111/jre/lib/deploy.pack 2c41ec5bcbb2ca944b748903b39a45cc                  
 /usr/java/jdk1.8.0_111/jre/lib/ext/localedata.pack 035979fc8d9e3ab801fe4cc13ee564d9          
 /usr/java/jdk1.8.0_111/jre/lib/javaws.pack fca11febf27a7452e4d22cd554a7a4a9                  
 /usr/java/jdk1.8.0_111/jre/lib/jsse.pack dde297bd14714a7f82f6cdd5edea5707
 /usr/java/jdk1.8.0_111/jre/lib/plugin.pack c209a7a71c58567555d10fb0bd6c47b6
 /usr/java/jdk1.8.0_111/jre/lib/rt.pack 54d085990029980b87e18198690e6fe0
 /usr/java/jdk1.8.0_111/lib/tools.pack 52266ea5d70810bcbdeaeb41f7e526e2
Description: Java Platform Standard Edition Development Kit
 The Java Platform Standard Edition Development Kit (JDK) includes both
 the runtime environment (Java virtual machine, the Java platform classes
 and supporting files) and development tools (compilers, debuggers,
 tool libraries and other tools).
 The JDK is a development environment for building applications, applets
 and components that can be deployed with the Java Platform Standard
 Edition Runtime Environment.
 (Converted from a rpm package by alien version 8.95.)
Description-md5: ae0ab6b38ab278a40ff85d4bdaf97ceb
  • 1
    What is the reason of installing java this weird way? – Pilot6 Nov 13 '16 at 17:10
  • try to fix it by running "sudo dpkg --configure -a && sudo apt-get install -f && sudo apt-get autoremove " – Fcmam5 Nov 13 '16 at 17:22
  • This was in output: /var/lib/dpkg/info/jre1.8.0-111.postinst: řádek 641: /usr/sbin/alternatives: Adresář nebo soubor neexistuje #line 641: /usr/sbin/alternatives: File or directory doesn't exist. dpkg: chyba při zpracovávání balíku jre1.8.0-111 (--configure): podproces instalovaný post-installation skript vrátil chybový status 127 Při zpracování nastaly chyby: #error code 127 jre1.8.0-111 – matj1 Nov 13 '16 at 18:02
  • to Pilot6: On JDK download page, there were rpm and tar.gz files to download. I knew rpm is a package and I was lazy to search how to install tar.gz archive. So I downloaded rpm and then you know, what happpened (conversion to deb and installation). Then I installed tar.gz version, but the broken package is still there. – matj1 Nov 13 '16 at 18:43

Solution: I reinstalled the system.

There were other things to fix and it isn't on my primary PC. So I didn't mind it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.