Error when performing go get

Hi all,

I am running on Ubuntu Mate Willy linux in a Virtual box on Windows. I have installed Go from the tar file to the recommended directory as shown in the installation guide: tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz.

I also set the GOPATH to my workspace that contains the src and bin directory.

Next step was to run go get and then I got the error that opening an .a file failed.

I tried to play with the rights on the files in the GOROOT but this did not help.

When I installed the GOROOT in a directory under my home directory it worked fine.

Can someone help me out? I am helped for now but was confused by this behavior.


Do not set GOROOT. Do not copy stuff (other than the Go compiler) into /usr/local/go. Do show us the output of go env and go get -v -x $something.

(Addition because Discourse won’t let me post the same thing twice, although the original posts are similar beyond it’s detection capabilities.)


I will try again this afternoon. It may have to to with the fact that I did not remove the 1.7 version before extracting 1.8.

Yes, this will be the problem. Delete /usr/local/go and start again from scratch.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.