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

前端 未结 25 2939
死守一世寂寞
死守一世寂寞 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:17

    Ubuntu 14.04

    export GOPATH=$HOME/go
    

    Additionally you can add this string to file

    $HOME/.bashrc
    

提交回复
热议问题