ERROR    ▶ 0001 You need to set GOPATH environment variable

linux中GOPATH环境变量配置

 

 

 这个错误是因为GOPATH 没有设置

设置:

sudo vim /etc/profile

在最后一行添加

export GOPATH=/vagrant/www/go        #你自己的目录(ps:不是go安装目录)
export PATH=$PATH:$GOPATH/bin

wq保存退出后更新一下文件

source  /etc/profile

 

再go env查看:

linux中GOPATH环境变量配置

相关文章:

  • 2021-12-15
  • 2021-04-24
  • 2021-12-13
  • 2021-10-21
猜你喜欢
  • 2021-12-12
  • 2022-12-23
  • 2022-01-10
  • 2021-07-02
  • 2021-06-19
  • 2021-05-17
相关资源
相似解决方案