简体   繁体   English

gcc:设备上没有剩余空间了吗?

[英]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.

相关问题 Docker 错误:设备上没有剩余空间 - Docker error : no space left on device XCode:SVN中的提交失败:设备上没有剩余空间 - XCode: Commit failed in SVN : No space left on device Android-如何捕获java.io.IOException:设备上没有剩余空间 - Android - How to catch java.io.IOException: no space left on device 尝试安装 Tensorflow 时 Ubuntu 上的“设备上没有剩余空间” - “No space left on device” on Ubuntu when trying to install Tensorflow 解决所有内存并引发-bash:无法为here-document创建临时文件:服务器上设备上没有剩余空间 - Solr ate all Memory and throws -bash: cannot create temp file for here-document: No space left on device on Server cuda 程序 kernel 代码在设备 memory 空间 - cuda program kernel code in device memory space 哪个任务/程序会占用android设备的大量内存空间? - which task / program will consume lot of memory space of android device? 是否需要将操作系统分配给设备的内存映射到虚拟内存空间? - Is is necessary to map the memory allocated to the device by the OS to a virtual memory space? 在下载文件之前检查iphone设备上是否有足够的空间 - check enough space on iphone device before downloading files Java进程在主要GC期间死掉“超出交换空间”,机器上留有足够的内存 - Java process dies “Out of swap space” during major GC, with plenty of memory left on machine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM