[英]gcc: No space left on device?
I'm trying to make some C code with a simple gcc command in Ubuntu 10, but for some reason, I keep getting an error: 我正在尝试在Ubuntu 10中使用简单的gcc命令制作一些C代码,但是由于某些原因,我一直遇到错误:
Cannot create temporary file in /tmp/: No space left on device
The thing is, though, I have plenty of space on the disk. 事实是,磁盘上有足够的空间。 Here is output of df -h: 这是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, in case you are wondering about the inodes: 还有df -i,以防您对inode感到疑惑:
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 I have space on the drive. 我也可以成功touch /tmp/test
,所以我知道驱动器上有空间。 Any ideas as to why gcc decided to throw a fit all of a sudden? 关于gcc为什么突然决定做出合适决定的任何想法? (It was working earlier) Thanks beforehand. (它之前工作的很早)谢谢。
It looks to me that your /tmp directory is actually mounted as a devtmpfs
which if I remember correctly is actually your computer's RAM. 在我看来,您的/ tmp目录实际上是作为devtmpfs
挂载的,如果我没有记错的话,它实际上是您计算机的RAM。
You can always reboot and see if that helps, increase your virtual memory partition, or you can close running programs to see if that helps. 您始终可以重新引导并查看是否有帮助,增加虚拟内存分区,或者可以关闭正在运行的程序以查看是否有帮助。 Additionally, you can maybe delete some unnecessary files from /tmp as they are volatile to at least the life of the session. 此外,您可能会从/ tmp中删除一些不必要的文件,因为它们至少对会话的生存期具有影响。
中间文件对于/tmp
太大,因此也许使用另一个临时目录( TMPDIR=/var/tmp g++ ...
)会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.