启动分区已满,升级失败,无法清理

启动分区已满,升级失败,无法清理

从所有其他问题和答案来看,这似乎是一个常见问题领域,但似乎都没有解决我的具体问题。

经过几次升级后,我的服务器启动分区已满。显然系统继续尝试升级,现在陷入了某种恶性循环。我无法升级,因为依赖项不匹配,我无法清理,因为有待处理的升级。

我手动删除了几个旧文件以提供空间,并按照其他已回答问题中的建议(列出版本并删除了五个最旧的版本)操作,但问题仍然存在。如果我尝试修复安装,将发生以下情况:

$ sudo apt-get -f install  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
Correcting dependencies... Done  
The following packages were automatically installed and are no longer required:  
  linux-image-3.2.0-60-generic linux-headers-3.2.0-65-generic  
  linux-image-3.2.0-63-generic linux-image-3.2.0-58-generic  
  linux-headers-3.2.0-60 linux-headers-3.2.0-61 linux-headers-3.2.0-63  
  linux-headers-3.2.0-58 linux-headers-3.2.0-64 linux-headers-3.2.0-59 
  linux-headers-3.2.0-65 linux-headers-3.2.0-60-generic  
  linux-headers-3.2.0-63-generic linux-headers-3.2.0-58-generic  
  linux-image-3.2.0-61-generic linux-image-3.2.0-64-generic  
  linux-image-3.2.0-59-generic linux-headers-3.2.0-61-generic  
  linux-headers-3.2.0-64-generic linux-headers-3.2.0-59-generic  
  linux-image-3.2.0-65-generic  
Use 'apt-get autoremove' to remove them.  
The following extra packages will be installed:  
  linux-server  
The following packages will be upgraded:  
  linux-server  
1 upgraded, 0 newly installed, 0 to remove and 158 not upgraded.  
1 not fully installed or removed.  
Need to get 0 B/1,736 B of archives.  
After this operation, 0 B of additional disk space will be used.  
    Do you want to continue [Y/n]? y  
dpkg: dependency problems prevent configuration of linux-server:  
 linux-server depends on linux-image-server (= 3.2.0.68.81); however:  
  Version of linux-image-server on system is 3.2.0.74.88.  
 linux-server depends on linux-headers-server (= 3.2.0.68.81); however:  
  Version of linux-headers-server on system is 3.2.0.74.88.  
dpkg: error processing linux-server (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because the error message indicates it's a follow-up error from a     previous failure.
                        Errors were encountered while processing:  
 linux-server  
E: Sub-process /usr/bin/dpkg returned an error code (1)  

您会发现我以前尝试过这个...
尝试过autoremove,,,。cleanautocleanconfigure

如果它是任何线索的话,大约有一半的时间当我运行该命令时我会丢失终端会话!

$ df -h /boot  
Filesystem      Size  Used Avail Use% Mounted on  
/dev/sda1       228M  107M  109M  50% /boot  

并且所有涉及apt-get或的操作dpkg都会失败并出现类似上述错误。

答案1

我终于在这个类似的问题中找到了答案:内核版本不匹配导致 APT 受阻

我按照该问题的答案手动安装了 linux-server 3.2.0.74.88,一切都解决了。非常感谢 Eliah Kagan 提供的周到、实用且全面的答案。

相关内容