apt-get upgrade 在下载内容时进入无限循环

apt-get upgrade 在下载内容时进入无限循环

我的 Ubuntu 12.04 安装(是的,我现在还不想升级)让我无法更新。这种情况已经持续了一周多。我运行apt-get update没有问题,但当我运行时,apt-get upgrade它会不断重新下载相同的内容很多次,我无法再获得任何更新,例如

我怎样才能解决这个问题?

azg@olympus:~/code/rm/debug$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  icedtea-6-jre-cacao icedtea-6-jre-jamvm icedtea-7-jre-jamvm libsvn1 openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib openjdk-7-dbg
  openjdk-7-doc openjdk-7-jdk openjdk-7-jre openjdk-7-jre-headless openjdk-7-source subversion
14 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 320 MB/329 MB of archives.
After this operation, 6,309 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]
Get:2 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]             
Get:3 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]             
Get:4 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]             
Get:5 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]             
Get:6 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]             
Get:7 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]             
Get:8 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]             
Get:9 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]             
Get:10 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]            
Get:11 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]            
Get:12 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]            
Get:13 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]            
Get:14 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]            
Get:15 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]            
Get:16 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]            
Get:17 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]            
Get:18 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]            
Get:19 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]            
Get:20 http://ch.archive.ubuntu.com/ubuntu/ precise-updates/universe openjdk-7-jdk amd64 7u65-2.5.1-4ubuntu1~0.12.04.1 [16.5 MB]            
5% [20 openjdk-7-jdk 16.4 MB/16.5 MB 99%]                                                                                            

答案1

在终端上尝试一下

sudo apt-get remove --purge oracle-java7-installer

然后将此 repo 添加到您的软件源中

sudo add-apt-repository ppa:webupd8team/java && apt-get update

然后重新安装

sudo apt-get install oracle-java7-installer

相关内容