如何修复 Ubuntu 14.04 更新问题?

如何修复 Ubuntu 14.04 更新问题?

我正在尝试更新我的 Ubuntu 14.04(64 位),但软件更新程序显示此错误:

检查您是否正在使用第三方存储库。如果是,请禁用它们,因为它们是问题的常见来源。此外,在终端中运行以下命令:apt-get install -f

我试过了sudo apt-get install -f但是它显示这个错误:

sudo 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:
  gir1.2-nautilus-3.0 libcommon-sense-perl libjson-perl libjson-xs-perl
  libtext-csv-perl libtext-csv-xs-perl python-nautilus wine-mono4.5.2
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-headers-3.13.0-45-generic
The following NEW packages will be installed:
  linux-headers-3.13.0-45-generic
0 upgraded, 1 newly installed, 0 to remove and 15 not upgraded.
2 not fully installed or removed.
Need to get 0 B/715 kB of archives.
After this operation, 13.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 409472 files and directories currently installed.)
Preparing to unpack .../linux-headers-3.13.0-45-generic_3.13.0-45.74_amd64.deb ...
Unpacking linux-headers-3.13.0-45-generic (3.13.0-45.74) ...
dpkg: error processing archive /var/cache/apt/archives/linux-headers-3.13.0-45-generic_3.13.0-45.74_amd64.deb (--unpack):
 unable to create `/usr/src/linux-headers-3.13.0-45-generic/include/config/tcp/cong/veno.h.dpkg-new' (while processing `./usr/src/linux-headers-3.13.0-45-generic/include/config/tcp/cong/veno.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.13.0-45-generic_3.13.0-45.74_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

知道如何修复此问题吗?

编辑

输出df -h

sudo df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda4        43G   15G   26G  37% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            989M  4.0K  989M   1% /dev
tmpfs           200M  1.3M  199M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            999M   16M  984M   2% /run/shm
none            100M   44K  100M   1% /run/user

输出df -i

sudo df -i

Filesystem      Inodes   IUsed  IFree IUse% Mounted on
/dev/sda4      2818048 2816288   1760  100% /
none            255708       2 255706    1% /sys/fs/cgroup
udev            253011     517 252494    1% /dev
tmpfs           255708     555 255153    1% /run
none            255708       3 255705    1% /run/lock
none            255708      57 255651    1% /run/shm
none            255708      27 255681    1% /run/user

答案1

您遇到的问题是由于/( /dev/sda4) 使用的 inode 百分比为 100%。创建文件时,会为该文件生成一个 inode 以保存元数据。因此,无论文件有多大或多小,一个文件都会产生一个关联的 inode。

根据实际可用磁盘空间的大小,我猜你可能有许多占用最小磁盘空间(ext FS 为 4K)的小文件。因此,解决方案是删除不必要的文件以释放 inode,然后你就可以开始了。

相关内容