CentOS下载目录/ var / cache / yum / base / packages中空间不足


8

我尝试在安装安装百胜libpcap

 Error Downloading Packages:
  14:libpcap-0.9.4-15.el5.i386: Insufficient space in download directory /var/cache/yum/base/packages
    * free   0 
    * needed 108 k

这是df -h的输出:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              20G   19G     0 100% /
/dev/sda3             202G   38G  154G  20% /home
tmpfs                 1.5G     0  1.5G   0% /dev/shm

fdisk -l

Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2611    20972826   83  Linux
/dev/sda2            2612        3251     5140800   82  Linux swap / Solaris
/dev/sda3            3252       30394   218026147+  83  Linux

我已启动yum clean all,但没有成功清理空间。

请指教。谢谢。

Answers:


13

您的/坐骑已满。

首先,验证/tmp为空。

其次,清空的内容/var/cache/yum/base/packages(或者考虑在系统上验证以下步骤时,仅移动内容。)

然后尝试bind从安装空间/home/var/cache/yum/base/packages正是如此:

mount --bind /home/yum /var/cache/yum/base/packages

然后/etc/fstab像这样在您的底部添加一个条目:

/home/yum /var/cache/yum/base/packages none,rw bind 0 0

设置绑定安装后,运行df -h将显示/var/cache/yum/base/packages具有boku空间。然后运行yum并验证一切是否正常。


9

我确实同意您需要清理/中的某些内容,但是您是否尝试过更改

cachedir = / var / cache / yum

在/etc/yum.conf中

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.