Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have read every thread I could find -- even the ones that say that the question has been answered elsewhere but none of them address the specific issue I am having. Update Manager ran and produced errors relating to unmet dependency and suggested using apt-get install -f which fails with this message:

Unpacking linux-headers-3.5.0-36 (from .../linux-headers-3.5.0-36_3.5.0-36.57~precise1_all.deb) ...
dpkg: error processing /var/cache/apt/archives/linux-headers-3.5.0-36_3.5.0-36.57~precise1_all.deb (--unpack):
 unable to create `/usr/src/linux-headers-3.5.0-36/arch/arm/mach-iop32x/include/mach/glantank.h.dpkg-new' (while processing `./usr/src/linux-headers-3.5.0-36/arch/arm/mach-iop32x/include/mach/glantank.h'): No space left on device

I suspect that the last 5 words No space left on device are significant but df and du both show adequate space. So I am wondering, what device needs more space?

share|improve this question
    
Do you have space on the root partition? –  don.joey Jul 8 '13 at 13:38
1  
Please paste (i) the output of df -hand (ii) the output of mount. dpkg will clean up the files after it finished working, so it might appear that you have enough space when in fact you don't. Consider running apt-get clean before you start dpkg. –  January Jul 8 '13 at 13:41
    
to monitor do watch -n 1 df -h in a terminal while doing the apt-get install (it will slow down a bit you i/o but you will know which file system is too small) –  Emmanuel Jul 8 '13 at 13:51
    
Ouput from df -h –  user172974 Jul 8 '13 at 14:27
    
Filesystem Size Used Avail Use% Mounted on /dev/sda1 5.5G 4.4G 786M 86% / udev 996M 4.0K 996M 1% /dev tmpfs 402M 880K 401M 1% /run none 5.0M 0 5.0M 0% /run/lock none 1004M 156K 1004M 1% /run/shm /dev/sdb1 30G 1.4G 27G 5% /home /dev/sdc1 299G 31G 268G 11% /media/HD-PCTU2 –  user172974 Jul 8 '13 at 14:28
add comment

2 Answers 2

I just encountered this same problem. I elsewhere came across a mention of inodes, and ran df -i in my terminal to check inode usage. This showed inode use at 99%. So, while my disk had plenty of space left, I wasn't able to create more files because of the limit in the number of inodes. Some disk cleanup was the solution to my problem.

share|improve this answer
    
I had the same problem caused by kernel updates which do not remove old kernels automatically. Linux headers of every kernel update occupy a considerable number of inodes! --- My "safe" solution was to move two kernel headers directories to a different filesystem: cd /usr/src ; cp -a linux-headers-3.2.0-3{2,3}* /home/tmp-hdr ; rm -r linux-headers-3.2.0-3{2,3}*, apt-get-install -f, remove some other headers the right way: apt-get purge linux-headers-..., move the headers from the tmp back: cd /usr/src ; cp -a /home/tmp-hdr/* .. Remove more of the old kernels using apt-get purge. –  pabouk Jun 29 at 20:40
    
Please consider participating on the bug reports with low activity: Bug #1089195 linux-headers will eat your inodes on LTS., Bug #690911 Installation without formatting fails to remove old kernels –  pabouk Jun 29 at 20:43
add comment

I'm thinking your boot partition is full of old kernel images, leaving no room for the new one apt-get is trying to install. You can type

 dpkg -l linux-image-\* | grep ii

into a terminal window. When I do this, I get

 ii  linux-headers-3.8.0-18                    3.8.0-18.28                            all          Header files related to Linux kernel version 3.8.0
 ii  linux-headers-3.8.0-18-generic            3.8.0-18.28                            amd64        Linux kernel headers for version 3.8.0 on 64 bit x86 SMP
 ii  linux-headers-3.8.0-19                    3.8.0-19.30                            all          Header files related to Linux kernel version 3.8.0
 ii  linux-headers-3.8.0-19-generic            3.8.0-19.30                            amd64        Linux kernel headers for version 3.8.0 on 64 bit x86 SMP
 ii  linux-headers-3.8.0-21                    3.8.0-21.32                            all          Header files related to Linux kernel version 3.8.0
 ii  linux-headers-3.8.0-21-generic            3.8.0-21.32                            amd64        Linux kernel headers for version 3.8.0 on 64 bit x86 SMP
 ii  linux-headers-3.8.0-22                    3.8.0-22.33                            all          Header files related to Linux kernel version 3.8.0
 ii  linux-headers-3.8.0-22-generic            3.8.0-22.33                            amd64        Linux kernel headers for version 3.8.0 on 64 bit x86 SMP
 ii  linux-headers-3.8.0-23                    3.8.0-23.34                            all          Header files related to Linux kernel version 3.8.0
 ii  linux-headers-3.8.0-23-generic            3.8.0-23.34                            amd64        Linux kernel headers for version 3.8.0 on 64 bit x86 SMP
 ii  linux-headers-3.8.0-25                    3.8.0-25.37                            all          Header files related to Linux kernel version 3.8.0
 ii  linux-headers-3.8.0-25-generic            3.8.0-25.37                            amd64        Linux kernel headers for version 3.8.0 on 64 bit x86 SMP
 ii  linux-headers-generic                     3.8.0.25.43                            amd64        Generic Linux kernel headers

Since I have quite a few, I could delete some of the oldest with

 sudo apt-get remove linux-headers-3.8.0-18

Do that a couple of times to your oldest linux-headers-* and you should have room.

share|improve this answer
1  
This brings to light the other issue. Every time I attempt to run dpkg it tells me that it has an unmet dependency The following packages have unmet dependencies: linux-headers-3.5.0-36-generic : Depends: linux-headers-3.5.0-36 but it is not going to be installed and that is the thing that won't install because there isn't enough space –  user172974 Jul 8 '13 at 14:41
    
Perhaps a backup of your user files is in order, before you mess with your boot partition? I've never had trouble doing this, but if I did, I'd have everything I needed for a reinstall. Of course, I do a backup every day anyway. –  Marc Jul 8 '13 at 14:55
    
I was hoping I wouldn't need to mess with the boot partition and that there was a way to break out of the endless cycle of dependency. I see now that it's probably going to be easier to backup data and start over. Now that I know the importance of cleaning out older items I'll make it a habit. Thanks to all for their assistance. –  user172974 Jul 8 '13 at 16:44
    
Not at all . . . backing up is always a good idea, and you're not really messing with the boot partition very much, just uninstalling some packages with apt-get. It should be a piece of cake. I just suggested backing up your data because I always suggest backing up data if you're having a problem (or even if you're not!) I actually ran those commands on my own system to test them. It took me three minutes to remove linux-headers-3.8.0-18. –  Marc Jul 8 '13 at 16:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.