go install always attempts to use GOROOT and GOPATH is not listed under go env

前端 未结 4 1500
死守一世寂寞
死守一世寂寞 2020-12-31 13:19

I\'m having a quite frustrating problem with the GOPATH, which, despite being set in .profile, is not appearing when invoking go env,

4条回答
  •  傲寒
    傲寒 (楼主)
    2020-12-31 14:21

    Create a soft link, then copy the go binary in /usr/local as follow:

    # ln -sf /usr/local/go/bin/go /usr/bin/go
    

提交回复
热议问题