apt-get 更新不起作用

apt-get 更新不起作用

你好,Ubuntu 社区,

我已经使用 Linux 五年了,在这五年里,我从来没有遇到过 Ubuntu apt 程序的问题。它通常运行良好,是一种即时获取更新和软件的方法。但我的电脑似乎无法获得正确的更新,apt-get 也无法自行更新。

我正在运行 Ubuntu 12.04 3.8.0-29-generic #42~precise1-Ubuntu x86_64 我是英特尔双核处理器。

我在我的笔记本电脑上安装了 12.04,它的规格与我的塔式机相似,但当我在其上安装 Ubuntu 时没有出现任何问题。

因此,当我尝试这样做时, sudo apt-get update 我得到了以下信息:

Hit http://archive.ubuntu.com precise Release.gpg
Hit http://archive.ubuntu.com precise-updates Release.gpg
Hit http://archive.ubuntu.com precise-backports Release.gpg
Hit http://archive.ubuntu.com precise-security Release.gpg
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://archive.ubuntu.com precise Release
Hit http://ppa.launchpad.net precise Release                         
Hit http://archive.ubuntu.com precise-updates Release
Hit http://archive.ubuntu.com precise-backports Release
Hit http://ppa.launchpad.net precise/main Sources                    
Hit http://archive.ubuntu.com precise-security Release
Hit http://ppa.launchpad.net precise/main amd64 Packages             
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Ign http://ppa.launchpad.net precise/main Translation-en
Hit http://archive.ubuntu.com precise/main Sources
Hit http://archive.ubuntu.com precise/restricted Sources
Hit http://archive.ubuntu.com precise/multiverse Sources
Hit http://archive.ubuntu.com precise/restricted amd64 Packages
Hit http://archive.ubuntu.com precise/multiverse amd64 Packages
Hit http://archive.ubuntu.com precise/main i386 Packages
Hit http://archive.ubuntu.com precise/restricted i386 Packages
Hit http://archive.ubuntu.com precise/multiverse i386 Packages
Hit http://archive.ubuntu.com precise/main TranslationIndex
Hit http://archive.ubuntu.com precise/multiverse TranslationIndex
Hit http://archive.ubuntu.com precise/restricted TranslationIndex
Hit http://archive.ubuntu.com precise/universe TranslationIndex
Hit http://archive.ubuntu.com precise-updates/restricted Sources
Hit http://archive.ubuntu.com precise-updates/universe Sources
Hit http://archive.ubuntu.com precise-updates/multiverse Sources
Hit http://archive.ubuntu.com precise-updates/main amd64 Packages
Hit http://archive.ubuntu.com precise-updates/restricted amd64 Packages
Hit http://archive.ubuntu.com precise-updates/universe amd64 Packages
Hit http://archive.ubuntu.com precise-updates/multiverse amd64 Packages
Hit http://archive.ubuntu.com precise-updates/restricted i386 Packages
Hit http://archive.ubuntu.com precise-updates/universe i386 Packages
Hit http://archive.ubuntu.com precise-updates/multiverse i386 Packages
Hit http://archive.ubuntu.com precise-updates/main TranslationIndex
Hit http://archive.ubuntu.com precise-updates/multiverse TranslationIndex
Hit http://archive.ubuntu.com precise-updates/restricted TranslationIndex
Hit http://archive.ubuntu.com precise-updates/universe TranslationIndex
Hit http://archive.ubuntu.com precise-backports/main Sources
Hit http://archive.ubuntu.com precise-backports/restricted Sources
Hit http://archive.ubuntu.com precise-backports/universe Sources
Hit http://archive.ubuntu.com precise-backports/multiverse Sources
Hit http://archive.ubuntu.com precise-backports/main amd64 Packages
Hit http://archive.ubuntu.com precise-backports/restricted amd64 Packages
Hit http://archive.ubuntu.com precise-backports/universe amd64 Packages
Hit http://archive.ubuntu.com precise-backports/multiverse amd64 Packages
Hit http://archive.ubuntu.com precise-backports/main i386 Packages
Hit http://archive.ubuntu.com precise-backports/restricted i386 Packages
Hit http://archive.ubuntu.com precise-backports/universe i386 Packages
Hit http://archive.ubuntu.com precise-backports/multiverse i386 Packages
Hit http://archive.ubuntu.com precise-backports/main TranslationIndex
Hit http://archive.ubuntu.com precise-backports/multiverse TranslationIndex
Hit http://archive.ubuntu.com precise-backports/restricted TranslationIndex
Hit http://archive.ubuntu.com precise-backports/universe TranslationIndex
Hit http://archive.ubuntu.com precise-security/main Sources
Hit http://archive.ubuntu.com precise-security/restricted Sources
Hit http://archive.ubuntu.com precise-security/universe Sources
Hit http://archive.ubuntu.com precise-security/multiverse Sources
Hit http://archive.ubuntu.com precise-security/main amd64 Packages
Hit http://archive.ubuntu.com precise-security/restricted amd64 Packages
Hit http://archive.ubuntu.com precise-security/universe amd64 Packages
Hit http://archive.ubuntu.com precise-security/multiverse amd64 Packages
Hit http://archive.ubuntu.com precise-security/restricted i386 Packages
Hit http://archive.ubuntu.com precise-security/universe i386 Packages
Hit http://archive.ubuntu.com precise-security/multiverse i386 Packages
Hit http://archive.ubuntu.com precise-security/main TranslationIndex
Hit http://archive.ubuntu.com precise-security/multiverse TranslationIndex
Hit http://archive.ubuntu.com precise-security/restricted TranslationIndex
Hit http://archive.ubuntu.com precise-security/universe TranslationIndex
Get:1 http://archive.ubuntu.com precise/universe Sources [6239 kB]
Get:2 http://archive.ubuntu.com precise/main amd64 Packages [1640 kB]
Get:3 http://archive.ubuntu.com precise/universe amd64 Packages [6167 kB]
Get:4 http://archive.ubuntu.com precise/universe i386 Packages [6180 kB]
Get:5 http://archive.ubuntu.com precise/main Translation-en [726 kB]
Hit http://archive.ubuntu.com precise/multiverse Translation-en                                            
100% [5 Translation-en bzip2 0 B] [Waiting for headers]                                         3422 kB/s 0s
bzip2: Data integrity error when decompressing.
    Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

Hit http://archive.ubuntu.com precise/restricted Translation-en                                            
Get:6 http://archive.ubuntu.com precise-updates/main Sources [504 kB]                                      
Get:7 http://archive.ubuntu.com precise-updates/main i386 Packages [888 kB]                                
Hit http://archive.ubuntu.com precise-updates/main Translation-en                                          
Hit http://archive.ubuntu.com precise-updates/multiverse Translation-en                                    
Hit http://archive.ubuntu.com precise-updates/restricted Translation-en                                    
Hit http://archive.ubuntu.com precise-updates/universe Translation-en                                      
Hit http://archive.ubuntu.com precise-backports/main Translation-en                                        
Hit http://archive.ubuntu.com precise-backports/multiverse Translation-en                                  
Hit http://archive.ubuntu.com precise-backports/restricted Translation-en                                  
Hit http://archive.ubuntu.com precise-backports/universe Translation-en                                    
Get:8 http://archive.ubuntu.com precise-security/main i386 Packages [406 kB]                               
Hit http://archive.ubuntu.com precise-security/main Translation-en                                         
Hit http://archive.ubuntu.com precise-security/multiverse Translation-en                                   
Hit http://archive.ubuntu.com precise-security/restricted Translation-en                                   
Hit http://archive.ubuntu.com precise-security/universe Translation-en                                     
Get:9 http://archive.ubuntu.com precise/universe Translation-en [4133 kB]                                  
Fetched 726 kB in 25s (29.0 kB/s)                                                                          
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_source_Sources  Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_Packages  Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-amd64_Packages  Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages  Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-updates_main_source_Sources  Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages  Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-security_main_binary-i386_Packages  Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_i18n_Translation-en  Encountered a section with no Package: header

E: Some index files failed to download. They have been ignored, or old ones used instead.

我记得在安装过程中看到过,当时我很担心。第一次尝试安装 Ubuntu 12.04.3 时,安装程​​序崩溃了,它说由于软件是第三方的,所以无法发送报告,我应该删除第三方软件。之后,我再次擦除硬盘,进行了安装,过了一段时间,安装完成了……但安装时仍然出现这些错误,但没有崩溃。

此外,每次我尝试安装程序时,都会出现此信息

~$ sudo apt-get install apache2
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:
 apache2 : Depends: apache2-mpm-worker (= 2.2.22-1ubuntu1.4) but it is not going to be installed or
                    apache2-mpm-prefork (= 2.2.22-1ubuntu1.4) but it is not going to be installed or
                    apache2-mpm-event (= 2.2.22-1ubuntu1.4) but it is not going to be installed or
                    apache2-mpm-itk (= 2.2.22-1ubuntu1.4) but it is not going to be installed
           Depends: apache2.2-common (= 2.2.22-1ubuntu1.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我尝试安装的所有程序都会发生这种情况,所以现在我安装软件的能力也崩溃了。

最后,我几乎尝试了所有我能找到的方法。例如:

sudo apt-get clean
cd /var/lib/apt/lists/partial
sudo rm *
sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade

同样的结果。

sudo apt-get clean
mv /var/lib/apt /var/lib/apt.old
mv /var/cache/apt /var/cache/apt.old
sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade

也会导致失败。

我甚至尝试过这个链接

添加 PPA 后如何解决未满足的依赖关系?

我以为那将是我的最后一站,我将不再遇到这个问题。但是,我仍然遇到这个问题。还有谁能帮我找出我的系统出了什么问题吗?

相关内容