I am using Ubuntu Linux.
gcc
is not using /tmp
for temporary files (.i, .o, .s).
I exported environment variable TMPDIR
like this:
export TMPDIR=/tmp
however gcc
still tries to create tmp files in ./
so, if there is no W
permission, gcc
fails.
So I want to fix the gcc
temporary file path to /tmp/
however, gcc is ignoring the TMPDIR
.
What would be the problem here?
Adding the:
export TMPDIR=$HOME/temp;
line to ~/.profile
file and then running:
. ~/.profile
command followed by a system restart did the trick for me in case anyone comes across this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.