1. 程式人生 > >yum遇到空間不足時解決方案

yum遇到空間不足時解決方案

執行yum update時提示空間不足,目前見到了2種:
1.我升級過程中遇到的問題,提示如下:
Transaction Check Error:
  installing package kernel-PAE-2.6.34.7-61.fc13.i686 needs 6MB on the /boot filesystem

Error Summary
-------------
Disk Requirements:
  At least 6MB more space needed on the /boot filesystem.

出現此問題後用df檢視分割槽情況,結果如下:
[[email protected]

~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             3.9G  3.2G  466M  88% /
tmpfs                 502M   24K  502M   1% /dev/shm
/dev/sda1              49M   26M   21M  55% /boot
/dev/sda5              14G  1.1G   13G   8% /home 

解決方法:
(1)Remove old kernels. If you have multiple old kernels you're no longer using, you might be able to free up enough space to install the new one by uninstalling the very oldest kernel image. This will only work if you have 2 or more kernels installed, and assumes your system isn't actually using that oldest kernel image.

例項(http://www.itenter.com/operatingsystems/linux/2010/0811/5516.html):
[[email protected] ~]$ uname -r    檢視現在所使用的kernel
2.6.33.6-147.2.4.fc13.i686.PAE
[[email protected] ~]$ rpm -qa | grep kernel   檢查系統中所存在的kernel
kernel-headers-2.6.33.6-147.2.4.fc13.i686
kernel-PAE-devel-2.6.33.6-147.2.4.fc13.i686
abrt-addon-kerneloops-1.1.1-2.fc13.i686
kernel-PAE-2.6.33.6-147.2.4.fc13.i686
kernel-2.6.33.6-147.2.4.fc13.i686
kernel-PAE-devel-2.6.33.6-147.fc13.i686
kernel-PAE-2.6.33.6-147.fc13.i686
kernel-2.6.33.6-147.fc13.i686
系統中有兩個版本的核心,分別是2.6.33.6-147和2.6.33.6-147.2.4。根據uname查詢結果可知現在147.2.4核心下,而且這個核心已經是新核心,所以我們刪除舊核心2.6.33.6-147。
[

[email protected] ~]$ su -c’yum remove kernel-2.6.33.6-147.fc13.i686 kernel-PAE-2.6.33.6-147.fc13.i686 kernel-PAE-devel-2.6.33.6-147.fc13.i686′
[[email protected] ~]$ reboot   重啟系統並檢查現在核心

實戰:
[[email protected] ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             3.9G  3.2G  466M  88% /
tmpfs                 502M   24K  502M   1% /dev/shm
/dev/sda1              49M   26M   21M  55% /boot
/dev/sda5              14G  1.1G   13G   8% /home
[[email protected] ~]$ uname -r
2.6.33.3-85.fc13.i686.PAE
[[email protected] ~]$ rpm -qa | grep kernel
abrt-addon-kerneloops-1.1.0-1.fc13.i686
kernel-PAE-devel-2.6.33.3-85.fc13.i686
kernel-headers-2.6.33.3-85.fc13.i686
kernel-PAE-2.6.33.3-85.fc13.i686
沒有多個核心,所以沒法用刪除核心的方法了。不過可以試試刪除一個package看看效果。
[[email protected] bochs]# yum remove kernel-PAE-2.6.33.3-85.fc13.i686
[[email protected] bochs]# rpm -qa | grep kernel
abrt-addon-kerneloops-1.1.0-1.fc13.i686
kernel-PAE-devel-2.6.33.3-85.fc13.i686
kernel-headers-2.6.33.3-85.fc13.i686
[[email protected] bochs]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             3.9G  3.1G  590M  85% /
tmpfs                 502M   24K  502M   1% /dev/shm
/dev/sda1              49M  5.4M   41M  12% /boot   //可用空間增大了
/dev/sda5              14G  1.1G   13G   8% /home

(2)Relocate /boot to the root partition. You could relocate /boot from its own partition to a directory on the root partition (/). I'm not sure of the process -- I'd assume this would get the basic setup going, but you'd need another command to update your bootloader (Grub?) and alert it to the new location.
These commands need root privs (use sudo with each, or get a root shell with su).

make the new location
mkdir /boot-new

copy boot files
( cd /boot ; tar cf - . ) | ( cd /boot-new ; tar xvf - )
(with sudo...)
sudo sh -c "( cd /boot ; tar cf - . ) | ( cd /boot-new ; tar xvf - )"

unmount separate partition -- maybe not doable without rebooting? maybe need to boot to a liveCD?
umount /boot

remove old boot directory, rename new
mv /boot /boot-old
mv /boot-new /boot

edit /etc/fstab, comment out /boot partition line or change mountpoint to /boot-old

missing step: reconfigure your bootloader to access /boot on /dev/sda7 instead of the old version on /dev/sda6.


(3)Resize your /boot partition. You'll need a LiveCD for the task. Boot into it and run gparted. You'll probably need to resize your system partition slightly, then move it, to make room. I can't give you specifics without knowing the partition table.

Expand the /boot partition to a size of at least 2-300MB to avoid having this problem again.

Resizing system partitions can be dangerous. Make backups before you attempt it, and read up on what you are doing before you do it. This is my least recommended option.


(4)Replace your system drive. Finally, if you've wanted a larger system hard drive, now is a great time to do so. In the process of copying partitions from the old drive to the new, you can expand the /boot partition. You'd use a LiveCD for this as well.
原文見:http://superuser.com/questions/82204/resizing-the-boot-partition

2.網上看到的問題,提示如下:
Insufficient space in download directory //var/cache/yum/updates/packages
解決方法:
(1)
For example if mounted partition /u has sufficient room,
cd /var/cache
find yum -print|cpio -pdmv /u
rm -rf yum
ln -s /u/yum yum

或者

yum clean all  清空一下快取
(2)
yum update 的軟體包,可以放在別的地方。即可。
修改/etc/yum.conf 裡面第一個就是下載包放的位置。我放在/home/XX/fc10 裡面。使用者備份。
[~ $] more /etc/yum.conf
1 [main]
2 #cachedir=/var/cache/yum
3 cachedir=/home/XX/fc10-yum

相關推薦

yum遇到空間不足解決方案

執行yum update時提示空間不足,目前見到了2種: 1.我升級過程中遇到的問題,提示如下: Transaction Check Error:   installing package kernel-PAE-2.6.34.7-61.fc13.i686 needs 6MB

同步以太坊測試網絡導致C盤存儲空間不足解決辦法

它的 iss targe 方法 步驟 link 很好 tex print 在嘗試同步以太坊的的測試網絡時可能會遇到一個問題,就是會發現同步下來的區塊會默認存儲在C盤底下導致磁盤空間不足,具體的路徑如下: C:\Users\Administrator\AppData\Roam

CSS input type="number"出現上下箭頭解決方案

箭頭 pear pin 方案 number tex spin bsp 出現 input type="number"時錄入內容不可控制,解決方案是在css中添加//火狐input[type=number] { -moz-appearance:textfield;

yum提示空間不足到根分區擴容

map 擴展卷 bsp ica /var/ 類型 pvcreate 提示 success 記錄一次安裝軟件的報錯                                                                   ——[email 

[No0000115]打開Excel2016提示內存或磁盤空間不足解決方法

無效 內存 mic exce 任務管理 pos upd 技術 計算 癥狀: 法一:右鍵文件,並 解除鎖定; 法二: 在系統的服務中查看Windows Firewall服務 和Windows Update服務是否開啟,如果沒有開啟就把他們啟動一下。 1、在桌

yum源常見問題及解決方案 ~

yum源常搭建常見問題及解決方案 如果虛擬機器無法下載軟體 可能的原因有: 1.真機yum源沒有配置好 2.真機共享yum源的掛載錯誤 3.真機apache沒有開啟 4.真機火牆沒有關閉(或者是真機火牆開著的但未新增http服務到火牆策略中) 5.虛擬機器的yum源指向錯誤 6.所掛

vmware linux 硬碟空間不足增加硬碟並掛載

不同的版本的vmware在設定介面中可能稍有不同,基本是一致的。 還有一種方式是擴充套件,這裡沒有記錄,擴充套件時需要在虛擬機器關機狀態下。 1、選擇在vmware中點選設定並開啟,將游標定位在hard Disk這一選項,然後點選下方的Add按鈕 2、點選next,執行下一個步

c編譯的錯誤:程式中有遊離的‘\240’‘\302’‘\XXX 解決方案

偶爾從網上看到不錯的原始碼,想研究下,不幸編譯時遇到 “錯誤:程式中有遊離的‘\240’‘\302’”之類的錯誤, 大量的原始碼不可能再全部重敲一遍,經過一番研究,終於讓我找到簡單的解決方案,還是本著讓後人少走彎路的想法,分享下: 首先,編譯器提示的\xxx,都是8進位制的編

Linux中yum命令映象源出錯解決方案

好頭疼,最近虛擬機器中的linux系統一直不能安裝東西,只要install就報找不到可用的連結源。。。但是要安裝東西啊,所以就著手解決下。 解決方法:更換源 1.備份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yu

oracle 表空間 不足如何處理

--1、查看錶在那個表空間   select tablespace_name,table_name from user_talbes where table_name='test'; --2、獲取使用者的預設表空間   select   username,   DEF

Ubuntu下Wireshark普通許可權不足解決方案

安裝wireshark: sudo apt-get install wireshark 安裝後開啟wireshark 提示許可權不足訊息: Couldn’t run /usr/bin/dump

virtualbox 虛擬機器磁碟空間不足解決

轉自:http://www.lampblog.net/2010/08/virtualbox-%E8%99%9A%E6%8B%9F%E6%9C%BA%E7%A3%81%E7%9B%98%E7%A9%BA%E9%97%B4%E4%B8%8D%E8%B6%B3%E7%9A%84%E8%A7%A3%E5%8

Android Studio 打包jar中包含另一個jar或多個jar解決方案

關於.jar檔案: 平時我們Android專案開發中經常會用到第三方的.jar檔案。 其實.jar檔案就是一個類似.zip檔案的壓縮包,裡面包含了一些原始碼,注意的是.jar不包含資原始檔(res、圖片等) 一、首先學習如何在Android studi

oracle undo表空間不足解決方法

資料庫大批量插入提交注意事項-undo: undo定義: UNDO 表空間用於存放UNDO資料,當執行DML操作(INSERT,UPDATE和DELETE)時,oracle會將這些操作的舊資料寫入到UNDO段滾段,還可以使用UNDO表空間.因為規劃和管理回滾段比較複雜,所

linux或unix安裝軟體包空間不足解決辦法

        最近因為公司的伺服器編譯器版本太老需要在上面安裝新的gcc,但是安裝的時候又出現了安裝目錄/opt/空間不足的問題,讓我鬱悶了好久。         一個同事想出來以下的解決辦法:         軟體包的目標路徑是/opt/freeware        

MyEclipse 記憶體不足問題解決方案

1: 開啟MyEclipse目錄下的myeclipse.ini檔案 在後面修改下面幾個屬性 -vmargs -Xms512m              ( Java能夠分配的記憶體) -Xmx5

mac系統空間佔用大解決方案

本人mac2017 pro 120G,系統空間佔用90G,一直提示空間不足,刪除各種無用檔案後才釋放10G空間。網上搜索解決方案,彈出mackeeper(mac 清理軟體)廣告,搜尋mackeeper,發現網上罵聲一片,基本上斷定流氓軟體。後來發現一款軟體OmniDiskSw

cdh安裝hadoop平臺根目錄空間不足如何解決

 目前大部分公司安裝作業系統時給根僅有50G,但是cdh的lib 和日誌都放在/var下,時間長了空間會爆 解決方法: 1.至少給根100G的空間 2.只能做軟連線連到其他盤陣下具體操作步驟如下: /data是外掛的盤陣後者你自己大的路徑 cp -r -p  /var/lo

mysql-bin日誌檔案過大導致磁碟空間不足問題解決方法

在MySQL資料庫中,mysql-bin.000001、mysql- bin.000002等檔案是資料庫的操作日誌,例如UPDATE一個表,或者DELETE一些資料,即使該語句沒有匹配的資料,這個命令也會儲存到日誌檔案中,還包括每個語句執行的時間,也會記錄進去的。 這樣做主

iTunes C盤佔用空間太大 解決方案

關鍵詞:itunes 空間太大 C盤 轉移 解決方案 itunes預設在C盤有2個較大的資料夾,一個是資料庫,就是裝有.ipa的資料夾,另一個是同步備份資料。如果不轉移,往往會在C盤佔據5-10G的空間,這對前幾年的電腦來說,是有點大了。 轉移資料庫: ①在itunes上