我无法更新我的Ubuntu!

升级到内核3.2.0-31-generic-pae ,我的Ubuntu机器无法获取更新并显示一些错误。 此外,更新通知程序保留在我的托盘中。

当我单击安装更新时,它会出现此错误

有时这个错误信息也会弹出

我试过sudo apt-get install -f但它给了我以下输出:

 $ sudo apt-get install -f [sudo] password for balakrish: 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: lcdproc-extra-drivers libg15render1 libsdl-gfx1.2-4 libsvga1 libsdl-net1.2 libxosd2 libmikmod2 libzeitgeist0.8-cil libtaoframework-sdl1.2-cil libg15daemon-client1 libsdl-mixer1.2 libtaoframework-opengl3.0-cil lcdproc libnunit2.5-cil libsmpeg0 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: linux-headers-3.2.0-31-generic linux-headers-3.2.0-31-generic-pae The following NEW packages will be installed: linux-headers-3.2.0-31-generic linux-headers-3.2.0-31-generic-pae 0 upgraded, 2 newly installed, 0 to remove and 55 not upgraded. 2 not fully installed or removed. Need to get 0 B/1,958 kB of archives. After this operation, 22.4 MB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 513139 files and directories currently installed.) Unpacking linux-headers-3.2.0-31-generic (from .../linux-headers-3.2.0-31-generic_3.2.0-31.50_i386.deb) ... dpkg: error processing /var/cache/apt/archives/linux-headers-3.2.0-31-generic_3.2.0-31.50_i386.deb (--unpack): error creating directory `./usr/src/linux-headers-3.2.0-31-generic/include/config/comedi/usb': No space left on device No apport report written because the error message indicates a disk full error dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Unpacking linux-headers-3.2.0-31-generic-pae (from .../linux-headers-3.2.0-31-generic-pae_3.2.0-31.50_i386.deb) ... dpkg: error processing /var/cache/apt/archives/linux-headers-3.2.0-31-generic-pae_3.2.0-31.50_i386.deb (--unpack): unable to create `/usr/src/linux-headers-3.2.0-31-generic-pae/include/config/comedi/addi/apci/3001.h.dpkg-new' (while processing `./usr/src/linux-headers-3.2.0-31-generic-pae/include/config/comedi/addi/apci/3001.h'): No space left on device No apport report written because the error message indicates a disk full error dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/linux-headers-3.2.0-31-generic_3.2.0-31.50_i386.deb /var/cache/apt/archives/linux-headers-3.2.0-31-generic-pae_3.2.0-31.50_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1) 

df给出了这个输出:

 balakrish@balaKrish:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda15 35G 3.0G 30G 10% / udev 1.9G 4.0K 1.9G 1% /dev tmpfs 766M 876K 765M 1% /run none 5.0M 0 5.0M 0% /run/lock none 1.9G 356K 1.9G 1% /run/shm /dev/sda16 25G 20G 3.5G 86% /home /dev/sda14 6.9G 5.0G 1.7G 76% /usr /dev/sdb1 74G 31G 40G 44% /media/Miscellaneous /dev/sda7 120G 119G 1.2G 100% /media/Library /dev/sda12 100G 31G 70G 31% /media/Songs 

sudo fdisk -l给出了这个:

 balakrish@balaKrish:~$ sudo fdisk -l Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0002f59b Device Boot Start End Blocks Id System /dev/sda1 * 63 125837144 62918541 7 HPFS/NTFS/exFAT /dev/sda2 125837206 1953503999 913833397 f W95 Ext'd (LBA) /dev/sda5 125837208 293603939 83883366 7 HPFS/NTFS/exFAT /dev/sda6 293604003 461370734 83883366 7 HPFS/NTFS/exFAT /dev/sda7 461370798 713028959 125829081 7 HPFS/NTFS/exFAT /dev/sda8 713029023 808298602 47634790 7 HPFS/NTFS/exFAT /dev/sda9 880795818 1132453979 125829081 7 HPFS/NTFS/exFAT /dev/sda10 1132454043 1227834214 47690086 7 HPFS/NTFS/exFAT /dev/sda11 1300220838 1447022744 73400953+ 7 HPFS/NTFS/exFAT /dev/sda12 1447022808 1656735254 104856223+ 7 HPFS/NTFS/exFAT /dev/sda13 1656735318 1953503999 148384341 7 HPFS/NTFS/exFAT /dev/sda14 1285543936 1300219903 7337984 83 Linux /dev/sda15 808300544 880795647 36247552 83 Linux /dev/sda16 1227835392 1279238143 25701376 83 Linux /dev/sda17 1279240192 1285537791 3148800 82 Linux swap / Solaris Partition table entries are not in disk order Disk /dev/sdb: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00028680 Device Boot Start End Blocks Id System /dev/sdb1 63 156301487 78150712+ 83 Linux 

ls /usr/src输出:

 balakrish@balaKrish:~$ ls /usr/src linux-headers-3.2.0-24 linux-headers-3.2.0-27-generic linux-headers-3.2.0-24-generic linux-headers-3.2.0-27-generic-pae linux-headers-3.2.0-24-generic-pae linux-headers-3.2.0-29 linux-headers-3.2.0-25 linux-headers-3.2.0-29-generic linux-headers-3.2.0-25-generic linux-headers-3.2.0-29-generic-pae linux-headers-3.2.0-25-generic-pae linux-headers-3.2.0-30 linux-headers-3.2.0-26 linux-headers-3.2.0-30-generic linux-headers-3.2.0-26-generic linux-headers-3.2.0-30-generic-pae linux-headers-3.2.0-26-generic-pae linux-headers-3.2.0-31 linux-headers-3.2.0-27 vboxhost-4.1.20 

从上面的输出通知这个:

  error creating directory `./usr/src/linux-headers-3.2.0-31-generic/include/config/comedi/usb': No space left on device unable to create `/usr/src/linux-headers-3.2.0-31-generic-pae/include/config/comedi/addi/apci/3001.h.dpkg-new' (while processing `./usr/src/linux-headers-3.2.0-31-generic-pae/include/config/comedi/addi/apci/3001.h'): No space left on device 

然后由于你的df

 /dev/sda14 6.9G 5.0G 1.7G 76% /usr 

这意味着你有/usr美元的1.7G免费。 linux-headers-3.2.0-31-genericlinux-headers-3.2.0-31-generic-pae将安装在/usr/src/目录中。

这是您的错误,因此您必须清理/usr

尝试清理/usr/src的旧内核映像和标头。

这是秘密:

没有写入apport报告,因为错误消息表明磁盘已满错误。

所以,解决方案是首先释放一些磁盘空间!

您可以通过多种方式执行此操作:

  1. 首先,我会尝试使用以下方法清理apt的缓存: sudo apt-get clean
  2. 之后,如果/home/目录不在单独的分区上,则清除浏览器的缓存,
  3. 还用rm -rf ~/.thumbnails删除缩略图缓存,
  4. 最终检查并删除/var/log/目录中的旧日志文件。

这些是无痛的磁盘释放技巧。

*更新

如果这些都没有帮助你,那么你可能用完了inode,所以你应该用更多的inode重新创建你的FS,或者尝试保持分区清洁。

要充分利用这两个答案,只需使用 –

 sudo apt autoremove && sudo apt-get clean 

删除/ usr / src /中的旧内核 –

 sudo apt autoremove 

和清洁apt缓存 –

 sudo apt-get clean