go - 去获取github…给GOPATH不能启动〜

标签 go homebrew

我正在尝试运行:

$ go get github.com/scipipe/scipipe/...

但我收到错误消息:
go: GOPATH entry cannot start with shell metacharacter '~': "~/go"

我尝试重新安装go,但是没有任何效果。实际上,我什至不能运行version:
$ go version
go: GOPATH entry cannot start with shell metacharacter '~': "~/go"

我在Mac上,并且已经安装了Homebrew。怎么能这么严重地打破呢?请帮忙。

最佳答案

我找到一条线:(不知道它怎么到达那里)

export GOPATH="~/go"

我改成了:
export GOPATH="$HOME/go"

在我的.profile文件中。似乎已经完成了trick俩!

关于go - 去获取github…给GOPATH不能启动〜,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61748045/

相关文章:

node.js - brew安装 Node 错误

ruby-on-rails - Golang duplicate rails 设计 gem 密码加密

windows - 在 go lang 中使用 exec.command 进行网络使用

ssl - 去TLS连接

macos - libxml-ruby:无法构建 gem native 扩展

python - 在 Homebrew 软件中更新 pip 和 setuptools 不起作用

go - 从 golang 中的 fixed64 protobuf 字段读取 int64

functional-programming - go-lang curry 怎么做?

r - 通过 Homebrew 软件安装特定版本的 R

python - 在 Mac OS X 上安装 pygtk 的最简单方法