I have some vague memory of running into problems with the /tmp directory under ubuntu.
You might want to try changing your configuration to use a tmp directory in your user directory e.g. ~/tmp
Think you would do mkdir ~/tmp and then export TMPDIR=~/tmp.
It’s a while since I’ve had to do this so hope I’m not sending you off in the wrong direction, but perhaps worth a shot if nothing else is working.
edit: TMPDIR works with debian and the mktemp command rather than TEMP