[英]gcc is not using /tmp for temporary files
I am using Ubuntu Linux. 我正在使用Ubuntu Linux。
gcc
is not using /tmp
for temporary files (.i, .o, .s). gcc
未将/tmp
用于临时文件(.i,.o,.s)。
I exported environment variable TMPDIR
like this: 我像这样导出环境变量
TMPDIR
:
export TMPDIR=/tmp
however gcc
still tries to create tmp files in ./
so, if there is no W
permission, gcc
fails. 但是
gcc
仍然尝试在./
创建tmp文件,因此,如果没有W
权限, gcc
将会失败。
So I want to fix the gcc
temporary file path to /tmp/
however, gcc is ignoring the TMPDIR
. 因此,我想将
gcc
临时文件路径修复为/tmp/
但是,gcc忽略了TMPDIR
。
What would be the problem here? 这是什么问题?
Adding the: 添加:
export TMPDIR=$HOME/temp;
line to ~/.profile
file and then running: 行到
~/.profile
文件,然后运行:
. ~/.profile
command followed by a system restart did the trick for me in case anyone comes across this. 命令,然后重新启动系统 ,以防万一有人碰到这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.