yum install空間不足

本地要編一個 ceph-exporter,需要 ceph 的相關庫,於是在開發機上 yum install librados2-devel,報錯了,因爲第一次遇到所以記錄一下解決的思路。具體報錯的信息如下。

➜  / yum install ceph-devel
已加載插件:fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
base                                                                      | 3.6 kB  00:00:00


 One of the configured repositories failed (未知),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable <repoid>
        or
            subscription-manager repos --disable=<repoid>

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

下載目錄 /var/cache/yum/x86_64/7/centosplus 空間不足
    * 空閒   0
    * 需要 100 k

因爲平時在開發機會做各種測試,所以裝了很多莫名其妙的東西,也不及時清理掉,尤其是 Docker 的鏡像,因爲我們對接的業務同學打出來的鏡像都非常大,所以對硬盤是非常巨大的挑戰…yum install 的報錯一看就知道是磁盤空間不足了,於是考慮一下 yum 命令會 cache 很多東西,所以試了一下 yum clean all,但是清理掉一些 cache 之後,空間還是不夠。
具體看一下 df 吧。根目錄沒有空間了,通過 yum clean 用作不大,所以首先就考慮了 /var/log/ 下面的日誌,果然刪掉了之後,就釋放了很多空間,這個文件就解決了。
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章