系统升级问题

系统升级问题

我的系统在 AWS EC2 实例上运行。基本微实例。我运行以下命令:

sudo apt-get update

一切似乎都很好……现在

sudo apt-get upgrade

这是我收到此返回消息的地方

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
   linux-headers-4.4.0-87-generic : Depends: linux-headers-4.4.0-87 but it is 
not installed
E: Unmet dependencies. Try using -f.

然后这个……

root@ip-172-31-18-25:/# apt-get install -f
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:
  libecap3 libltdl7 linux-headers-4.4.0-51 linux-headers-4.4.0-51-generic
  linux-headers-4.4.0-53 linux-headers-4.4.0-53-generic linux-headers-4.4.0-57
  linux-headers-4.4.0-57-generic linux-headers-4.4.0-59
  linux-headers-4.4.0-59-generic linux-headers-4.4.0-62
  linux-headers-4.4.0-62-generic linux-headers-4.4.0-63
  linux-headers-4.4.0-63-generic linux-headers-4.4.0-64
  linux-headers-4.4.0-64-generic linux-headers-4.4.0-66
  linux-headers-4.4.0-66-generic linux-headers-4.4.0-70
  linux-headers-4.4.0-70-generic linux-headers-4.4.0-71
  linux-headers-4.4.0-71-generic linux-headers-4.4.0-72
  linux-headers-4.4.0-72-generic linux-headers-4.4.0-75
  linux-headers-4.4.0-75-generic linux-headers-4.4.0-78
  linux-headers-4.4.0-78-generic linux-headers-4.4.0-79
  linux-headers-4.4.0-79-generic linux-image-4.4.0-51-generic
  linux-image-4.4.0-53-generic linux-image-4.4.0-57-generic
  linux-image-4.4.0-59-generic linux-image-4.4.0-62-generic
  linux-image-4.4.0-63-generic linux-image-4.4.0-64-generic
  linux-image-4.4.0-66-generic linux-image-4.4.0-70-generic
  linux-image-4.4.0-71-generic linux-image-4.4.0-72-generic
  linux-image-4.4.0-75-generic linux-image-4.4.0-78-generic
  linux-image-4.4.0-79-generic snap-confine
  Use 'apt autoremove' to remove them.
  The following additional packages will be installed:
   linux-headers-4.4.0-87
  The following NEW packages will be installed:
  linux-headers-4.4.0-87
 0 upgraded, 1 newly installed, 0 to remove and 56 not upgraded.
 8 not fully installed or removed.
 Need to get 0 B/9,892 kB of archives.
 After this operation, 70.6 MB of additional disk space will be used.
 Do you want to continue? [Y/n] y
 (Reading database ... 513496 files and directories currently installed.)
 Preparing to unpack .../linux-headers-4.4.0-87_4.4.0-87.110_all.deb ...
  Unpacking linux-headers-4.4.0-87 (4.4.0-87.110) ...
  dpkg: error processing archive /var/cache/apt/archives/linux-headers-
  4.4.0-87_4.                                                                                                                                                             
 4.0-87.110_all.deb (--unpack):
  unable to create '/usr/src/linux-headers-4.4.0-
  87/arch/x86/include/asm/alternat                                                                                                                                                             
  ive-asm.h.dpkg-new' (while processing './usr/src/linux-headers-4.4.0-
  87/arch/x86                                                                                                                                                             
  /include/asm/alternative-asm.h'): No space left on device
  No apport report written because the error message indicates a disk full error
                                                                          dp                                                                                                                                                             
  kg-deb: error: subprocess paste was killed by signal (Broken pipe)
  Errors were encountered while processing:
  /var/cache/apt/archives/linux-headers-4.4.0-87_4.4.0-87.110_all.deb
 E: Sub-process /usr/bin/dpkg returned an error code (1)

是的,我知道它说磁盘已满,但事实上还远远没有满......

  root@ip-172-31-18-25:/# df -Th
  Filesystem     Type      Size  Used Avail Use% Mounted on
  udev           devtmpfs  487M     0  487M   0% /dev
  tmpfs          tmpfs     100M  3.0M   97M   4% /run
  /dev/xvda1     ext4      7.8G  4.4G  3.1G  59% /
  tmpfs          tmpfs     496M     0  496M   0% /dev/shm
  tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
  tmpfs          tmpfs     496M     0  496M   0% /sys/fs/cgroup
  tmpfs          tmpfs     100M     0  100M   0% /run/user/1000

编辑

我检查了一下df -i,它说启动盘已满。我受够了这个问题,所以我最终终止了实例。我已经终止了 aws ec2 上的许多实例,似乎我永远都在遇到问题。似乎你需要一个 IT/服务器专家来托管一个简单的网站,真恶心。为什么是 Ubuntu 开发人员?是因为我运行的是

   sudo apt-get 

代替

   sudo apt

真麻烦。它不应该这么难。

相关内容