How do I SET the GOPATH environment variable on Ubuntu? What file must I edit?

前端 未结 25 2801
死守一世寂寞
死守一世寂寞 2020-11-28 00:45

I am trying to do a go get:

go get github.com/go-sql-driver/mysql

and it fails with the following error:

packa         


        
相关标签:
25条回答
  • 2020-11-28 01:19
    export GOROOT=/usr/lib/go
    export GOPATH=$HOME/go
    export PATH=$PATH:$GOROOT/bin
    

    And you may want to check by $ go env

    0 讨论(0)
提交回复
热议问题