2

I was trying to install Hide.Me VPN for some reason. Unfortunately I keep running to the same error every time. I'm using these instructions to install it. Below is the error I keep running into.

nate1141@NatesPC:~$ sudo apt-get install openvpn network-manager-openvpn network-manager-openvpn-gnome
[sudo] password for nate1141: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
openvpn is already the newest version (2.3.10-1ubuntu2).
network-manager-openvpn is already the newest version (1.1.93-1ubuntu1).
network-manager-openvpn-gnome is already the newest version (1.1.93-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 83 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up jdk1.8.0-111 (1.8.0111-fcs-1) ...
Unpacking JAR files...
    tools.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_111/lib/tools.pack
    plugin.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_111/jre/lib/plugin.pack
    javaws.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_111/jre/lib/javaws.pack
    deploy.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_111/jre/lib/deploy.pack
    rt.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_111/jre/lib/rt.pack
    jsse.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_111/jre/lib/jsse.pack
    charsets.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_111/jre/lib/charsets.pack
    localedata.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_111/jre/lib/ext/localedata.pack
/var/lib/dpkg/info/jdk1.8.0-111.postinst: line 641: /usr/sbin/alternatives: No such file or directory
/var/lib/dpkg/info/jdk1.8.0-111.postinst: line 653: /usr/sbin/alternatives: No such file or directory
dpkg: error processing package jdk1.8.0-111 (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 jdk1.8.0-111
E: Sub-process /usr/bin/dpkg returned an error code (1)

I recently installed JDK, had some troubles while installing it but somehow I managed to install it successfully.

Note: My system is Ubuntu 16.04LTS and I'm new to Ubuntu.

  • Have you run sudo apt-get update && sudo apt-get -f install yet? – zwets Oct 30 '16 at 20:42
  • what does that do ? @zwets – Nathan Damtew Oct 30 '16 at 20:45
  • 1
    Your problem isn't with the package you are trying to install (in fact, I suggest you remove Hide.Me VPN from the question title as it is unrelated). The problem is that Apt needs to finish a previous installation & configuration first. That command does just that (or at least tries to). – zwets Oct 30 '16 at 20:47
  • I guess that did not work , I got the same error. @zwets – Nathan Damtew Oct 30 '16 at 20:58
  • Looking again at the output: what is that jdk1.8 package? (And what is it trying to do in /usr/java??). The error /usr/sbin/alternatives: No such file or directory seems to imply that the alternatives package isn't installed, or is broken. I suggest uninstalling the JDK package first (and installing the standard Ubuntu package openjdk-8-jdk instead), then proceed. – zwets Oct 30 '16 at 21:09
2

You have an issue with /var/lib/dpkg/info/jdk1.8.0-111.postinst script (post installation or configuration script of jdk1.8.0-111 package)

The quickest workaround:

  1. Open /var/lib/dpkg/info/jdk1.8.0-111.postinst for editing and remove set -e from it
  2. Run sudo apt-get -f install to fix/complete installation.

Similar to my question here. There are many questions about different packages but with same solution. However, I'm not aware of any one that have nice answer to be canonical one and so we could flag other questions as duplicate. Even this solution, is a workaround and correct path is to raise bug report against each package to fix the script itself and make it more robust.

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.