Afterward, save the text file and quit Nano. If this answer is useful for you, please BUY ME A COFFEE I need your help to maintain blog.
I think this issue mostly affects docker containers, because they are stripped down distributions which in most cases doesn't even have simple binaries like man, vim etc installed. Paste this string into the new text file: Package: Pin: release oDebian,ajessie-backports Pin-Priority: -200. Try to install as below: sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update sudo apt-get install openjdk-8-jre. Installing the man package doesn't fix the issue, you need to create the folder manually. JAVA comes with two packages (JDK & JRE). To fix the issue simply execute this command mkdir -p /usr/share/man/man1. It seems that java packages require that folder to exist. Through on this article you will get idea to Install java, OpenJDK 6, OpenJDK 7, OpenJDK 8 on RHEL, CentOS. I've tried with different packages default-jdk, default-jre, openjdk-11-jre-headless, openjdk-8-jre-headless and the result was the same. Įrrors were encountered while processing:Į: Sub-process /usr/bin/dpkg returned an error code (1) I was struggling to install default-jre package on Debian 10 Docker container (I suspect it's the same on some versions of Ubuntu). Done E: Unable to locate package openjdk-8-jdk I specifically want openJDK rather than Oracle-Java-Kit that some repositories offer. sudo apt-get install -only-upgrade default-jdk. It's one of those issues, where the fix is simple and dumb, but hard to find. Once OpenJDK 11 appears in Ubuntu 18.04, its just going to be a matter of a package upgrade and which alternative switches to use.