E: Package 'oracle-java11-installer' has no installation candidate while installing java in Linux
https://phoenixnap.com/kb/how-to-install-java-ubuntu
Error:
E: Package 'oracle-java11-installer' has no installation candidate
Solution:
The mistake is that you used instructions on how to install java on Debian. Not Ubuntu.
As root, go to this folder: /etc/apt/sources.list.d
Locate this file: webupd8team-java.list and delete it.
Execute sudo apt-get update for the system to remove any reference to that update server.
Execute sudo add-apt-repository ppa:webupd8team/java to add the correct ppa to your system.
Execute sudo apt-get update again and you should be able to install everything correctly.
Reference:
https://askubuntu.com/questions/790671/oracle-java8-installer-no-installation-candidate