gcc 错误:Fatal error error writing to tmp No space left on device

在使用gcc make时报错:Fatal error error writing to tmp No space left on device

finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtSchemes.C:40: fatal error: error writing to /tmp/ccUN0zCh.s: No space left on device 
LaunderGibsonRSTM/LaunderGibsonRSTM.C:348: fatal error: error writing to /tmp/ccsslpCE.s: No space left on device 
LaunderGibsonRSTM/LaunderGibsonRSTM.C:368: fatal error: error writing to /tmp/ccnEKI2H.s: No space left on device 
faDdtSchemes/EulerFaDdtScheme/EulerFaDdtSchemes.C:42: fatal error: error writing to /tmp/cciY95in.s: No space left on device

解决方案:

Simply do the following command:

df /tmp

You should see something close to 100% of utilization for the partition hosting /tmp.

Solution 1: if possible, clean up your /tmp directory, or any other directory located on the full disk partition. Remove some temporary files, etc. If you are unsure, ask your local smiling sysadmin.

Solution 2: it is quite possible that the size of the partition hosting /tmp is too small for the kind of utilization you are doing with your workstation. It happens. On my workstation, I always make sure I have a large /tmp.

Simply read the man page for g++. Look up the section where they talk about the environment variable TMPDIR. 
Set your TMPDIR environment variable to a directory located on your 35GB free disk space. Restart your compilation.

That should do the trick.

我设置TMPDIR    export TMPDIR=/root ,问题解决。

TMPDIR wikipedia解释:

TMPDIR is the canonical Unix environment variable that should be used to specify a temporary directory for scratch space. Most Unix programs will honor this setting and use its value to denote the scratch area for temporary files instead of the common default of /tmp[1][2] or /var/tmp.[3]

Other forms sometimes accepted are TEMPTEMPDIR and TMP, but these alternatives are used more commonly by non-POSIX operating systems or non-conformant programs.

TMPDIR is specified in various Unix and similar standards, e.g. per the Single UNIX Specification.[4]

unset TMPDIR

时间: 2024-10-21 23:32:25

gcc 错误:Fatal error error writing to tmp No space left on device的相关文章

ndk-build 编译报错 fatal error: error writing to -: Invalid argument } ^

最近下载同事的 Android 工程代码,协作开发一些 Native 底层功能,需要首先编译底层的一些 JNI 的代码库,由于工程较大,且依赖的第三方库比较多,下载完毕后,通过 ndk-build 进行编译,报了一些个奇怪的错误,并指向了代码文件的最后一行,如下所示: fatal error: error writing to -: Invalid argument } ^ 此工程源码一直是同事在 MAC 下进行开发维护的,在同事的环境中是正常的,而我是 Windows 平台,刚开始怀疑是文件类

mysql执行SQL语句时报错:[Err] 3 - Error writing file '/tmp/MYP0G1B8' (Errcode: 28 - No space left on device)

问题描述: 今天一同事在mysql中执行SQL语句的时候,报了/tmp空间不足的问题,报错如下: [SQL] SELECT f.prov as 字段1, MAX( CASE f.flag_name WHEN '字段1' THEN f.num ELSE 0 END ) AS '字段1', MAX( CASE f.flag_name WHEN '店员量' THEN f.num ELSE 0 END ) AS '字段1', MAX( CASE f.flag_name WHEN '字段1' THEN f

SourceTree不出现用户登录窗口,提示错误fatal: unable to access'...'; error setting certificate verify locations

SourceTree不出现用户登录窗口,提示错误fatal: unable to access'...'; error setting certificate verify locations; ...\Git\mingw64\libexec\ssl\certs 去查看这个这个目录下的文件是否存在,不存在则放到对应的地方即可. SourceTree不出现用户登录窗口,提示错误fatal: unable to access'...'; error setting certificate verif

mysql-python 安装错误 fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

安装mysql-python之前, 请先安装setuptools. https://pypi.python.org/pypi/setuptools/7.0 下载mysql-python. 下载源码包. https://pypi.python.org/pypi/MySQL-python/1.2.5 解压后执行 python setup.py install 提示错误: fatal error C1083: Cannot open include file: 'config-win.h': No s

Q2:关于数组的解包错误 fatal error: Can't unwrap Optional

今天遇到一个小问题,想自己做个小项目,在一个controller中声明一个数组用于存储从数据库读来的内容,声明为 var bugCgs:[BugCategory],其实对应形式就是var className:[classType],很不巧,这样写会报错,如下图: 我自然知道在swift中变量都必须要有初始值(当然也不是一定的 例如在一个函数中就不需要).xcode提示要不要加一个required initializer 'init(coder:)'? 由于对可选类型还是有一定理解,我不假思索改成

编译依赖于React Native0.46.4的React Native IOS工程时,出现错误“fatal error: 'React/RCTEventEmitter.h' file not found”

我的环境: WebStorm 2017.2Build #WS-172.3317.70, built on July 14, 2017 JRE: 1.8.0_152-release-915-b5 x86_64JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.12.6 Xcode8.3.3(8E3004b) 网上搜索,可以解决我的问题的网址:https://stackoverflow.com/questions/41663002

grunt错误——Fatal error: Unable to find Gruntfile

E:\website\jquery-plugins>grunt A valid Gruntfile could not be found. Please see the getting started guide for more information on how to configure grunt: http://gruntjs.com/getting-started Fatal error: Unable to find Gruntfile. 错误提示Gruntfile.js文件找不到

VS2012与VS2015同时安装用VS2012创建MFC程序时弹出编译错误”fatal error C1083: 无法打开包括文件:“mprapidef.h”: No such file or directory”的解决办法

在WIndows 7操作系统上同时安装VS2012与VS2015并用VS2012创建MFC程序时弹出编译错误"fatal error C1083: 无法打开包括文件:"mprapidef.h": No such file or directory"的解决办法: I installed vs2015 and vs2012, then the same problem occurs,however, I find a solution. open visual stud

vs2008编译错误fatal error C1902: 程序数据库管理器不匹配;请检查安装解决

重装了本本上的Xp系统,如往常一样,升级,装杀毒软件,开发工具.一些进行的非常顺利.然而,在我打开VS2008准备耕作的时候,尽然出现了一邪恶的错误提示:vs2008编译错误fatal error C1902: 程序数据库管理器不匹配:请检查安装解决.进过多家的方法,均无效,重装VS也不行,最后终于百度到一无名大侠的解决方案,问题解决了,在这里记录下来,以备再有不测. 到C:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE下面拷贝msp