我无法在 Ubuntu 19.10 中安装 java8。我使用
sudo apt update
sudo apt install openjdk-8-jdk openjdk-8-jre
并得到
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
ca-certificates-java fonts-dejavu-extra java-common libatk-wrapper-java libatk-wrapper-java-jni libgail-common libgail18 libgtk2.0-0
libgtk2.0-bin libgtk2.0-common libice-dev libpthread-stubs0-dev libsm-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev libxt-dev
openjdk-8-jdk-headless openjdk-8-jre-headless x11proto-core-dev x11proto-dev xorg-sgml-doctools xtrans-dev
Suggested packages:
default-jre libice-doc libsm-doc libx11-doc libxcb-doc libxt-doc openjdk-8-demo openjdk-8-source visualvm icedtea-8-plugin
fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei fonts-wqy-zenhei
The following NEW packages will be installed:
ca-certificates-java fonts-dejavu-extra java-common libatk-wrapper-java libatk-wrapper-java-jni libgail-common libgail18 libgtk2.0-0
libgtk2.0-bin libgtk2.0-common libice-dev libpthread-stubs0-dev libsm-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev libxt-dev
openjdk-8-jdk openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless x11proto-core-dev x11proto-dev xorg-sgml-doctools xtrans-dev
0 upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
Need to get 42.9 MB of archives.
After this operation, 163 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Ign:1 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 java-common all 0.72
Err:2 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 openjdk-8-jre-headless amd64 8u232-b09-0ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Ign:3 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 ca-certificates-java all 20190405ubuntu1
Ign:4 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 fonts-dejavu-extra all 2.37-1
Ign:5 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libatk-wrapper-java all 0.35.0-3
Err:6 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libatk-wrapper-java-jni amd64 0.35.0-3
Temporary failure resolving 'us.archive.ubuntu.com'
Ign:7 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libgtk2.0-common all 2.24.32-4ubuntu1
Err:8 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libgtk2.0-0 amd64 2.24.32-4ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:9 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libgail18 amd64 2.24.32-4ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:10 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libgail-common amd64 2.24.32-4ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:11 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libgtk2.0-bin amd64 2.24.32-4ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Ign:12 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 xorg-sgml-doctools all 1:1.11-1
Ign:13 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 x11proto-dev all 2018.4-4
Ign:14 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 x11proto-core-dev all 2018.4-4
Err:15 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libice-dev amd64 2:1.0.10-0ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:16 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libpthread-stubs0-dev amd64 0.4-1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:17 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libsm-dev amd64 2:1.2.3-1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:18 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libxau-dev amd64 1:1.0.9-0ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:19 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libxdmcp-dev amd64 1:1.1.3-0ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Ign:20 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 xtrans-dev all 1.3.5-1build1
Err:21 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libxcb1-dev amd64 1.13.1-2
Temporary failure resolving 'us.archive.ubuntu.com'
Err:22 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libx11-dev amd64 2:1.6.8-1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:23 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libxt-dev amd64 1:1.1.5-1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:24 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 openjdk-8-jre amd64 8u232-b09-0ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:25 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 openjdk-8-jdk-headless amd64 8u232-b09-0ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:26 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 openjdk-8-jdk amd64 8u232-b09-0ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:1 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 java-common all 0.72
Temporary failure resolving 'us.archive.ubuntu.com'
Err:3 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 ca-certificates-java all 20190405ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:4 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 fonts-dejavu-extra all 2.37-1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:5 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libatk-wrapper-java all 0.35.0-3
Temporary failure resolving 'us.archive.ubuntu.com'
Err:7 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libgtk2.0-common all 2.24.32-4ubuntu1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:12 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 xorg-sgml-doctools all 1:1.11-1
Temporary failure resolving 'us.archive.ubuntu.com'
Err:13 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 x11proto-dev all 2018.4-4
Temporary failure resolving 'us.archive.ubuntu.com'
Err:14 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 x11proto-core-dev all 2018.4-4
Temporary failure resolving 'us.archive.ubuntu.com'
Err:20 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 xtrans-dev all 1.3.5-1build1
Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/j/java-common/java-common_0.72_all.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u232-b09-0ubuntu1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/c/ca-certificates-java/ca-certificates-java_20190405ubuntu1_all.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/f/fonts-dejavu/fonts-dejavu-extra_2.37-1_all.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/j/java-atk-wrapper/libatk-wrapper-java_0.35.0-3_all.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/j/java-atk-wrapper/libatk-wrapper-java-jni_0.35.0-3_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/gtk+2.0/libgtk2.0-common_2.24.32-4ubuntu1_all.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/gtk+2.0/libgtk2.0-0_2.24.32-4ubuntu1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/gtk+2.0/libgail18_2.24.32-4ubuntu1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/gtk+2.0/libgail-common_2.24.32-4ubuntu1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/gtk+2.0/libgtk2.0-bin_2.24.32-4ubuntu1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/x/xorg-sgml-doctools/xorg-sgml-doctools_1.11-1_all.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/x/xorgproto/x11proto-dev_2018.4-4_all.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/x/xorgproto/x11proto-core-dev_2018.4-4_all.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/libi/libice/libice-dev_1.0.10-0ubuntu1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/libp/libpthread-stubs/libpthread-stubs0-dev_0.4-1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/libs/libsm/libsm-dev_1.2.3-1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/libx/libxau/libxau-dev_1.0.9-0ubuntu1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/libx/libxdmcp/libxdmcp-dev_1.1.3-0ubuntu1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/x/xtrans/xtrans-dev_1.3.5-1build1_all.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/libx/libxcb/libxcb1-dev_1.13.1-2_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/libx/libx11/libx11-dev_1.6.8-1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/libx/libxt/libxt-dev_1.1.5-1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre_8u232-b09-0ubuntu1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk-headless_8u232-b09-0ubuntu1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk_8u232-b09-0ubuntu1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
还有
apt-get install default-jre
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
hd@ubuntu:~$ apt-get install oracle-java8-installer
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
请从头开始告诉我。我是 ubuntu 新手。在 vmware 上使用 ubuntu