Whenever I run any go command at all (other than go help
) the output is this:
mkdir C:\Users\LUCAS_~1\AppData\Local\Temp\go-build268335003: The file or
directory is corrupted and unreadable.
I'm not sure why this is happening, I've tried restarting, and that temporarily fixes it, but then after a couple of commands are executed, this starts happening again. I'm not sure if this will help, but my username is not LUCAS_~1
it's Lucas_000
. Also, I've checked my Temp
folder, and there doesn't seem to be anything named "go-build268335003".
Any help would be appreciated, thanks!
My first guess (confirmed in the comments) is that the TEMP
environment variable is set to a DOS 8.3 path, truncating the user name using the DOS rules. How this came to be, I have no idea.
Fixing the problem is simple: Change TEMP
to the full path.
The easy way is to open a command prompt and run the following:
setx TEMP C:\Users\LUCAS_000\AppData\Local\Temp
The slightly harder (but clearer) way (for Windows 8) is to follow the following sequence:
Start -> All Apps -> Control panel -> System ->
Advanced System Settings -> Advanced -> Environment variables