In order to install the JRE in ubuntu, you can use the apt-get install command, but use the default-jre package. Example shown below
# apt-get install default-jre Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: linux-headers-4.10.0-28 linux-headers-4.10.0-28-generic linux-headers-4.10.0-30 linux-headers-4.10.0-30-generic linux-headers-4.10.0-32 linux-headers-4.10.0-32-generic linux-headers-4.10.0-33 linux-headers-4.10.0-33-generic linux-headers-4.10.0-35 linux-headers-4.10.0-35-generic linux-image-4.10.0-28-generic linux-image-4.10.0-30-generic linux-image-4.10.0-32-generic linux-image-4.10.0-33-generic linux-image-4.10.0-35-generic linux-image-extra-4.10.0-28-generic linux-image-extra-4.10.0-30-generic linux-image-extra-4.10.0-32-generic linux-image-extra-4.10.0-33-generic linux-image-extra-4.10.0-35-generic Use 'apt autoremove' to remove them. The following additional packages will be installed: ca-certificates-java default-jre-headless fonts-dejavu-extra java-common libatk-wrapper-java libatk-wrapper-java-jni openjdk-8-jre openjdk-8-jre-headless Suggested packages: default-java-plugin icedtea-8-plugin fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei fonts-wqy-zenhei fonts-indic The following NEW packages will be installed: ca-certificates-java default-jre default-jre-headless fonts-dejavu-extra java-common libatk-wrapper-java libatk-wrapper-java-jni openjdk-8-jre openjdk-8-jre-headless 0 upgraded, 9 newly installed, 0 to remove and 80 not upgraded. Need to get 29.8 MB of archives. After this operation, 110 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 java-common all 0.57ubuntu1 [7,492 B] Get:2 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 default-jre-headless amd64 2:1.8-57ubuntu1 [4,118 B] Get:3 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 ca-certificates-java all 20161107 [12.6 kB] Get:4 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 openjdk-8-jre-headless amd64 8u131-b11-2ubuntu1.17.04.3 [27.7 MB] Get:5 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libatk-wrapper-java all 0.33.3-13 [34.1 kB] Get:6 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libatk-wrapper-java-jni amd64 0.33.3-13 [27.2 kB] Get:7 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 openjdk-8-jre amd64 8u131-b11-2ubuntu1.17.04.3 [69.7 kB] Get:8 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 default-jre amd64 2:1.8-57ubuntu1 [980 B] Get:9 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 fonts-dejavu-extra all 2.37-1 [1,953 kB] Fetched 29.8 MB in 4s (6,081 kB/s) Selecting previously unselected package java-common. (Reading database ... 397569 files and directories currently installed.) Preparing to unpack .../0-java-common_0.57ubuntu1_all.deb ... Unpacking java-common (0.57ubuntu1) ... Selecting previously unselected package default-jre-headless. Preparing to unpack .../1-default-jre-headless_2%3a1.8-57ubuntu1_amd64.deb ... Unpacking default-jre-headless (2:1.8-57ubuntu1) ... Selecting previously unselected package ca-certificates-java. Preparing to unpack .../2-ca-certificates-java_20161107_all.deb ... Unpacking ca-certificates-java (20161107) ... Selecting previously unselected package openjdk-8-jre-headless:amd64. Preparing to unpack .../3-openjdk-8-jre-headless_8u131-b11-2ubuntu1.17.04.3_amd64.deb ... Unpacking openjdk-8-jre-headless:amd64 (8u131-b11-2ubuntu1.17.04.3) ... Selecting previously unselected package libatk-wrapper-java. Preparing to unpack .../4-libatk-wrapper-java_0.33.3-13_all.deb ... Unpacking libatk-wrapper-java (0.33.3-13) ... Selecting previously unselected package libatk-wrapper-java-jni:amd64. Preparing to unpack .../5-libatk-wrapper-java-jni_0.33.3-13_amd64.deb ... Unpacking libatk-wrapper-java-jni:amd64 (0.33.3-13) ... Selecting previously unselected package openjdk-8-jre:amd64. Preparing to unpack .../6-openjdk-8-jre_8u131-b11-2ubuntu1.17.04.3_amd64.deb ... Unpacking openjdk-8-jre:amd64 (8u131-b11-2ubuntu1.17.04.3) ... Selecting previously unselected package default-jre. Preparing to unpack .../7-default-jre_2%3a1.8-57ubuntu1_amd64.deb ... Unpacking default-jre (2:1.8-57ubuntu1) ... Selecting previously unselected package fonts-dejavu-extra. Preparing to unpack .../8-fonts-dejavu-extra_2.37-1_all.deb ... Unpacking fonts-dejavu-extra (2.37-1) ... Processing triggers for mime-support (3.60ubuntu1) ... Processing triggers for desktop-file-utils (0.23-1ubuntu2) ... Setting up java-common (0.57ubuntu1) ... Processing triggers for bamfdaemon (0.5.3+17.04.20170406-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for libc-bin (2.24-9ubuntu2.2) ... Processing triggers for man-db (2.7.6.1-2) ... Processing triggers for gnome-menus (3.13.3-6ubuntu5) ... Setting up fonts-dejavu-extra (2.37-1) ... Processing triggers for ca-certificates (20170717~17.04.1) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. Setting up libatk-wrapper-java (0.33.3-13) ... Processing triggers for hicolor-icon-theme (0.15-1) ... Processing triggers for fontconfig (2.11.94-0ubuntu2) ... Setting up libatk-wrapper-java-jni:amd64 (0.33.3-13) ... Setting up openjdk-8-jre-headless:amd64 (8u131-b11-2ubuntu1.17.04.3) ... update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/rmid to provide /usr/bin/rmid (rmid) in auto mode update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in auto mode update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/jjs to provide /usr/bin/jjs (jjs) in auto mode update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/pack200 to provide /usr/bin/pack200 (pack200) in auto mode update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/unpack200 to provide /usr/bin/unpack200 (unpack200) in auto mode update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/orbd to provide /usr/bin/orbd (orbd) in auto mode update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/servertool to provide /usr/bin/servertool (servertool) in auto mode update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/tnameserv to provide /usr/bin/tnameserv (tnameserv) in auto mode update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode Setting up ca-certificates-java (20161107) ... Adding debian:Security_Communication_RootCA2.pem Adding debian:ePKI_Root_Certification_Authority.pem Adding debian:CA_Disig_Root_R1.pem Adding debian:DigiCert_Global_Root_G2.pem Adding debian:Go_Daddy_Root_Certificate_Authority_-_G2.pem Adding debian:Swisscom_Root_CA_1.pem Adding debian:SwissSign_Silver_CA_-_G2.pem Adding debian:Amazon_Root_CA_3.pem Adding debian:DST_Root_CA_X3.pem Adding debian:PSCProcert.pem Adding debian:GlobalSign_Root_CA_-_R3.pem Adding debian:GeoTrust_Global_CA.pem Adding debian:CA_Disig_Root_R2.pem Adding debian:Starfield_Services_Root_Certificate_Authority_-_G2.pem Adding debian:Certinomis_-_Autorité_Racine.pem Adding debian:GlobalSign_ECC_Root_CA_-_R5.pem Adding debian:Chambers_of_Commerce_Root_-_2008.pem Adding debian:XRamp_Global_CA_Root.pem Adding debian:ACCVRAIZ1.pem Adding debian:IdenTrust_Commercial_Root_CA_1.pem Adding debian:Atos_TrustedRoot_2011.pem Adding debian:TÜRKTRUST_Elektronik_Sertifika_Hizmet_Sağlayıcısı_H5.pem Adding debian:USERTrust_RSA_Certification_Authority.pem Adding debian:COMODO_ECC_Certification_Authority.pem Adding debian:SwissSign_Gold_CA_-_G2.pem Adding debian:GlobalSign_ECC_Root_CA_-_R4.pem Adding debian:TWCA_Global_Root_CA.pem Adding debian:SecureTrust_CA.pem Adding debian:AddTrust_External_Root.pem Adding debian:GeoTrust_Primary_Certification_Authority_-_G2.pem Adding debian:TeliaSonera_Root_CA_v1.pem Adding debian:Camerfirma_Chambers_of_Commerce_Root.pem Adding debian:UTN_USERFirst_Hardware_Root_CA.pem Adding debian:Amazon_Root_CA_1.pem Adding debian:Global_Chambersign_Root_-_2008.pem Adding debian:DigiCert_Global_Root_G3.pem Adding debian:DST_ACES_CA_X6.pem Adding debian:Network_Solutions_Certificate_Authority.pem Adding debian:Camerfirma_Global_Chambersign_Root.pem Adding debian:Taiwan_GRCA.pem Adding debian:TWCA_Root_Certification_Authority.pem Adding debian:Entrust_Root_Certification_Authority_-_G2.pem Adding debian:Certplus_Root_CA_G2.pem Adding debian:OISTE_WISeKey_Global_Root_GA_CA.pem Adding debian:Entrust_Root_Certification_Authority_-_EC1.pem Adding debian:AffirmTrust_Commercial.pem Adding debian:Visa_eCommerce_Root.pem Adding debian:TÜBİTAK_UEKAE_Kök_Sertifika_Hizmet_Sağlayıcısı_-_Sürüm_3.pem Adding debian:OISTE_WISeKey_Global_Root_GB_CA.pem Adding debian:AC_RAIZ_FNMT-RCM.pem Adding debian:VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem Adding debian:Entrust.net_Premium_2048_Secure_Server_CA.pem Adding debian:OpenTrust_Root_CA_G3.pem Adding debian:DigiCert_Assured_ID_Root_G3.pem Adding debian:Certum_Trusted_Network_CA.pem Adding debian:Comodo_AAA_Services_root.pem Adding debian:AddTrust_Low-Value_Services_Root.pem Adding debian:T-TeleSec_GlobalRoot_Class_2.pem Adding debian:ISRG_Root_X1.pem Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2015.pem Adding debian:Entrust_Root_Certification_Authority.pem Adding debian:AddTrust_Qualified_Certificates_Root.pem Adding debian:IdenTrust_Public_Sector_Root_CA_1.pem Adding debian:CFCA_EV_ROOT.pem Adding debian:QuoVadis_Root_CA_1_G3.pem Adding debian:Sonera_Class_2_Root_CA.pem Adding debian:Microsec_e-Szigno_Root_CA_2009.pem Adding debian:CNNIC_ROOT.pem Adding debian:GlobalSign_Root_CA.pem Adding debian:thawte_Primary_Root_CA.pem Adding debian:Amazon_Root_CA_4.pem Adding debian:Starfield_Root_Certificate_Authority_-_G2.pem Adding debian:D-TRUST_Root_Class_3_CA_2_EV_2009.pem Adding debian:Trustis_FPS_Root_CA.pem Adding debian:DigiCert_Trusted_Root_G4.pem Adding debian:D-TRUST_Root_Class_3_CA_2_2009.pem Adding debian:GeoTrust_Universal_CA_2.pem Adding debian:Certum_Trusted_Network_CA_2.pem Adding debian:USERTrust_ECC_Certification_Authority.pem Adding debian:Security_Communication_Root_CA.pem Adding debian:DigiCert_High_Assurance_EV_Root_CA.pem Adding debian:AddTrust_Public_Services_Root.pem Adding debian:COMODO_Certification_Authority.pem Adding debian:GlobalSign_Root_CA_-_R2.pem Adding debian:Swisscom_Root_EV_CA_2.pem Adding debian:Cybertrust_Global_Root.pem Adding debian:E-Tugra_Certification_Authority.pem Adding debian:Certplus_Root_CA_G1.pem Adding debian:NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem Adding debian:Security_Communication_EV_RootCA1.pem Adding debian:Swisscom_Root_CA_2.pem Adding debian:Certplus_Class_2_Primary_CA.pem Adding debian:SecureSign_RootCA11.pem Adding debian:Certum_Root_CA.pem Adding debian:Staat_der_Nederlanden_Root_CA_-_G3.pem Adding debian:Comodo_Secure_Services_root.pem Adding debian:T-TeleSec_GlobalRoot_Class_3.pem Adding debian:ssl-cert-snakeoil.pem Adding debian:Staat_der_Nederlanden_EV_Root_CA.pem Adding debian:VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem Adding debian:Certinomis_-_Root_CA.pem Adding debian:Hongkong_Post_Root_CA_1.pem Adding debian:GeoTrust_Primary_Certification_Authority.pem Adding debian:Starfield_Class_2_CA.pem Adding debian:OpenTrust_Root_CA_G2.pem Adding debian:LuxTrust_Global_Root_2.pem Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2011.pem Adding debian:QuoVadis_Root_CA_2_G3.pem Adding debian:QuoVadis_Root_CA.pem Adding debian:Staat_der_Nederlanden_Root_CA_-_G2.pem Adding debian:DigiCert_Assured_ID_Root_G2.pem Adding debian:VeriSign_Universal_Root_Certification_Authority.pem Adding debian:EE_Certification_Centre_Root_CA.pem Adding debian:GeoTrust_Primary_Certification_Authority_-_G3.pem Adding debian:QuoVadis_Root_CA_2.pem Adding debian:QuoVadis_Root_CA_3_G3.pem Adding debian:Actalis_Authentication_Root_CA.pem Adding debian:Buypass_Class_2_Root_CA.pem Adding debian:Amazon_Root_CA_2.pem Adding debian:AffirmTrust_Premium_ECC.pem Adding debian:AffirmTrust_Networking.pem Adding debian:Deutsche_Telekom_Root_CA_2.pem Adding debian:Go_Daddy_Class_2_CA.pem Adding debian:Izenpe.com.pem Adding debian:GeoTrust_Global_CA_2.pem Adding debian:thawte_Primary_Root_CA_-_G3.pem Adding debian:GeoTrust_Universal_CA.pem Adding debian:thawte_Primary_Root_CA_-_G2.pem Adding debian:Secure_Global_CA.pem Adding debian:Baltimore_CyberTrust_Root.pem Adding debian:TURKTRUST_Certificate_Services_Provider_Root_2007.pem Adding debian:AffirmTrust_Premium.pem Adding debian:DigiCert_Global_Root_CA.pem Adding debian:QuoVadis_Root_CA_3.pem Adding debian:Buypass_Class_3_Root_CA.pem Adding debian:Verisign_Class_3_Public_Primary_Certification_Authority_-_G3.pem Adding debian:TUBITAK_Kamu_SM_SSL_Kok_Sertifikasi_-_Surum_1.pem Adding debian:OpenTrust_Root_CA_G1.pem Adding debian:Comodo_Trusted_Services_root.pem Adding debian:Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem Adding debian:ACEDICOM_Root.pem Adding debian:COMODO_RSA_Certification_Authority.pem Adding debian:SZAFIR_ROOT_CA2.pem Adding debian:certSIGN_ROOT_CA.pem Adding debian:Certigna.pem Adding debian:China_Internet_Network_Information_Center_EV_Certificates_Root.pem Adding debian:EC-ACC.pem Adding debian:DigiCert_Assured_ID_Root_CA.pem Adding debian:Hellenic_Academic_and_Research_Institutions_ECC_RootCA_2015.pem done. Setting up openjdk-8-jre:amd64 (8u131-b11-2ubuntu1.17.04.3) ... update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/policytool to provide /usr/bin/policytool (policytool) in auto mode Setting up default-jre-headless (2:1.8-57ubuntu1) ... Setting up default-jre (2:1.8-57ubuntu1) ... Processing triggers for libc-bin (2.24-9ubuntu2.2) ... Processing triggers for ca-certificates (20170717~17.04.1) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. done.