Gcc: is there no space on the device?

I am trying to make C code with a simple gcc command in Ubuntu 10, but for some reason I keep getting the error message:

Cannot create temporary file in /tmp/: No space left on device 

The fact is that I have a lot of disk space. Here is the output of df -h:

 Filesystem Size Used Avail Use% Mounted on / 3.7G 2.4G 1.1G 70% / devtmpfs 312M 112K 312M 1% /dev none 312M 24K 312M 1% /dev/shm none 312M 80K 312M 1% /var/run none 312M 0 312M 0% /var/lock none 312M 0 312M 0% /lib/init/rw 

And df -i if you're interested in inodes:

 Filesystem Inodes IUsed IFree IUse% Mounted on / 240960 195198 45762 82% / devtmpfs 79775 609 79166 1% /dev none 79798 3 79795 1% /dev/shm none 79798 41 79757 1% /var/run none 79798 2 79796 1% /var/lock none 79798 1 79797 1% /lib/init/rw 

I can also touch /tmp/test successfully, so I know that I have disk space. Any ideas on why gcc decided to suddenly land? (He worked before) Thanks in advance.

+4
source share
2 answers

It seems to me that your / tmp directory is actually set as devtmpfs , which, if I remember correctly, is actually your computer RAM.

You can always reboot and see if it helps, expand your virtual memory partition or close running programs to see if it helps. In addition, you can delete unnecessary files from / tmp, as they are unstable, at least during the whole session.

+7
source

The intermediate files are too large for /tmp , so you can use a different temporary directory ( TMPDIR=/var/tmp g++ ... ).

+3
source

All Articles