首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法安装Java 8

无法安装Java 8
EN

Ask Ubuntu用户
提问于 2018-05-16 09:05:25
回答 1查看 892关注 0票数 1

我遵循教程安装JAVA 8。但是我有以下错误消息:

代码语言:javascript
复制
sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 oracle-java8-installer : Depends: java-common (>= 0.24) but it is not installable
                          Recommends: gsfonts-x11 but it is not installable
                          Recommends: oracle-java8-set-default but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我做错了什么?

<#>更新

我试着安装java-common,我得到了:

代码语言:javascript
复制
developer@monad:~$ sudo apt-get update
Hit:1 http://archive.canonical.com bionic InRelease
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                         
Hit:4 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease                                                                                              
Hit:6 http://dl.google.com/linux/chrome/deb stable Release                                     
Hit:7 http://ch.archive.ubuntu.com/ubuntu bionic-backports InRelease                           
Get:3 http://ch.archive.ubuntu.com/ubuntu bionic InRelease [242 kB]      
Get:8 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]         
Get:5 http://ch.archive.ubuntu.com/ubuntu bionic-updates InRelease [83.2 kB]                   
Get:10 http://ch.archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1'019 kB]                
Get:11 http://ch.archive.ubuntu.com/ubuntu bionic/main i386 Packages [1'007 kB]        
Get:12 http://ch.archive.ubuntu.com/ubuntu bionic/main Translation-en [516 kB]
Get:13 http://ch.archive.ubuntu.com/ubuntu bionic/main amd64 DEP-11 Metadata [477 kB]
Get:14 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 48x48 Icons [118 kB]
Get:14 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 48x48 Icons [118 kB]
Get:14 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 48x48 Icons [118 kB]
Get:14 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 48x48 Icons [118 kB]
Get:14 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 48x48 Icons [118 kB]
Get:14 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 48x48 Icons [118 kB]
Get:21 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [204 B]
Get:14 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 48x48 Icons [118 kB]
Get:14 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 48x48 Icons [118 kB]
Get:23 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [2'456 B]
Err:14 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 48x48 Icons                              
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:118319 [weak]
   - SHA256:72a445c7d354db04d1ffca6f52f7ab66953a3fa889bb66bf6d3210d3ab100f14
   - SHA1:176f580a423a2fcf3e257f0d9a00713e05545a35 [weak]
   - MD5Sum:bdfd4c6a690b2f9d0790443956b327fd [weak]
  Hashes of received file:
   - SHA256:39e0f680c56897c556fd4ce0dbba71e2622b0d1989f2e3fd5ab391d2c7c5c57f
   - SHA1:94e927ca7e5c296674fbed2580f9b34b3eb9f21c [weak]
   - MD5Sum:9b7c8db074b22f5aaba8c8161c204b67 [weak]
   - Filesize:162304 [weak]
  Last modification reported: Thu, 26 Apr 2018 21:24:34 +0000
  Release file created at: Thu, 26 Apr 2018 23:37:48 +0000
Get:24 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 64x64 Icons [245 kB]
Get:24 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 64x64 Icons [245 kB]
Get:24 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 64x64 Icons [245 kB]
Get:24 http://ch.archive.ubuntu.com/ubuntu bionic/main DEP-11 64x64 Icons [245 kB]
Get:30 http://ch.archive.ubuntu.com/ubuntu bionic/universe DEP-11 64x64 Icons [8'420 kB]
Get:30 http://ch.archive.ubuntu.com/ubuntu bionic/universe DEP-11 64x64 Icons [8'420 kB]
Get:30 http://ch.archive.ubuntu.com/ubuntu bionic/universe DEP-11 64x64 Icons [8'420 kB]
Get:30 http://ch.archive.ubuntu.com/ubuntu bionic/universe DEP-11 64x64 Icons [8'420 kB]
Get:35 http://ch.archive.ubuntu.com/ubuntu bionic/multiverse i386 Packages [144 kB]
Get:36 http://ch.archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
Get:36 http://ch.archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
Get:36 http://ch.archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
Get:36 http://ch.archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
Get:40 http://ch.archive.ubuntu.com/ubuntu bionic/multiverse Translation-en [108 kB]
Get:41 http://ch.archive.ubuntu.com/ubuntu bionic/multiverse amd64 DEP-11 Metadata [49.7 kB]
Get:42 http://ch.archive.ubuntu.com/ubuntu bionic/multiverse DEP-11 48x48 Icons [8'931 B]
Err:42 http://ch.archive.ubuntu.com/ubuntu bionic/multiverse DEP-11 48x48 Icons

Get:43 http://ch.archive.ubuntu.com/ubuntu bionic/multiverse DEP-11 64x64 Icons [225 kB]
Err:43 http://ch.archive.ubuntu.com/ubuntu bionic/multiverse DEP-11 64x64 Icons

Get:44 http://ch.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [1'968 B]
Err:44 http://ch.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons
  File has unexpected size (3584 != 1968). Mirror sync in progress? [IP: 130.59.113.36 80]
  Hashes of expected file:
   - Filesize:1968 [weak]
   - SHA256:cf4c0efefe32dbb80cc114bbcfea0a0839b376b3a226e5d0eec524dfa9a036ba
   - SHA1:6b216ddc4346a7b7ac7952c21dab5b5dc85be71a [weak]
   - MD5Sum:31363305fb0d685cd116efd64c89d0f5 [weak]
  Release file created at: Wed, 16 May 2018 05:38:20 +0000
Fetched 1'039 kB in 2s (473 kB/s)                        
Reading package lists... Done
E: Failed to fetch http://ch.archive.ubuntu.com/ubuntu/dists/bionic/main/dep11/by-hash/SHA256/72a445c7d354db04d1ffca6f52f7ab66953a3fa889bb66bf6d3210d3ab100f14  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:118319 [weak]
    - SHA256:72a445c7d354db04d1ffca6f52f7ab66953a3fa889bb66bf6d3210d3ab100f14
    - SHA1:176f580a423a2fcf3e257f0d9a00713e05545a35 [weak]
    - MD5Sum:bdfd4c6a690b2f9d0790443956b327fd [weak]
   Hashes of received file:
    - SHA256:39e0f680c56897c556fd4ce0dbba71e2622b0d1989f2e3fd5ab391d2c7c5c57f
    - SHA1:94e927ca7e5c296674fbed2580f9b34b3eb9f21c [weak]
    - MD5Sum:9b7c8db074b22f5aaba8c8161c204b67 [weak]
    - Filesize:162304 [weak]
   Last modification reported: Thu, 26 Apr 2018 21:24:34 +0000
   Release file created at: Thu, 26 Apr 2018 23:37:48 +0000
E: Failed to fetch http://ch.archive.ubuntu.com/ubuntu/dists/bionic/main/dep11/by-hash/SHA256/57f27cd53b92604cbf5c549382eec53d66ef2500fbdd54692688fd3675786aeb  
E: Failed to fetch http://ch.archive.ubuntu.com/ubuntu/dists/bionic/universe/dep11/by-hash/SHA256/44352c8652af9c9071b7cc7a035de3cd55b012e1df7291644bf9b99fd9dffd5a  
E: Failed to fetch http://ch.archive.ubuntu.com/ubuntu/dists/bionic/universe/dep11/by-hash/SHA256/ad41f363b444b3cec5ab94623ea0a5b42a7ea0165e70af3aabf14f244bdbd9eb  
E: Failed to fetch http://ch.archive.ubuntu.com/ubuntu/dists/bionic/multiverse/dep11/by-hash/SHA256/19202b981090cae365536eff597fad79c481e6104bbdb4b5c74c26871123d307  
W: Failed to fetch http://ch.archive.ubuntu.com/ubuntu/dists/bionic/multiverse/dep11/by-hash/SHA256/cbdc792d40b3644aa3fc1fc86f08b8449acf078a5ae52435dcf8dec8e941b897  
E: Failed to fetch http://ch.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/dep11/by-hash/SHA256/cf4c0efefe32dbb80cc114bbcfea0a0839b376b3a226e5d0eec524dfa9a036ba  File has unexpected size (3584 != 1968). Mirror sync in progress? [IP: 130.59.113.36 80]
   Hashes of expected file:
    - Filesize:1968 [weak]
    - SHA256:cf4c0efefe32dbb80cc114bbcfea0a0839b376b3a226e5d0eec524dfa9a036ba
    - SHA1:6b216ddc4346a7b7ac7952c21dab5b5dc85be71a [weak]
    - MD5Sum:31363305fb0d685cd116efd64c89d0f5 [weak]
   Release file created at: Wed, 16 May 2018 05:38:20 +0000
E: Failed to fetch http://ch.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/dep11/by-hash/SHA256/2b149a45789655d141ab257c7d7cb5d23ade57a6cc37b50bdb3b809889038b8c  
E: Failed to fetch http://ch.archive.ubuntu.com/ubuntu/dists/bionic-updates/universe/dep11/by-hash/SHA256/3f6762646dd674ed60d5ed3c1079f9ece9d61077d3becb1366a643f745cf4fb6  
E: Failed to fetch http://ch.archive.ubuntu.com/ubuntu/dists/bionic-updates/universe/dep11/by-hash/SHA256/0a561754077734a04bc7ab7c6c2a105ad8973f70191aa8fc428695bd67651b82  
W: Some index files failed to download. They have been ignored, or old ones used instead.
developer@monad:~$ sudo apt-get install java-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package java-common is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'java-common' has no installation candidate
EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2018-05-16 09:10:33

以下包有未满足的依赖关系: oracle-java8-installer:Depends:>=- problems (>= 0.24),但它不是可安装的建议: gsfonts-x11,但它不是可安装的建议: oracle-java8-set-default,但是它不会安装E:无法纠正问题,您已经保存了损坏的包。

上面的粗体很能说明问题。安装java-common

sudo apt-get install java-common

票数 2
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1036856

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档