安装Go依赖项失败

huangapple go评论81阅读模式
英文:

Failure installing Go dependency

问题

我已经在我的服务器上使用 CentOS 6.4 的 golang 仓库安装了 Go。路径设置正确,我可以运行 go version 命令。但是当我尝试下载下面的包时,我收到了这个错误。希望能得到帮助。

go get github.com/fiorix/freegeoip
# github.com/fiorix/freegeoip
无法创建 <nil>/go.o:没有该文件或目录
英文:

I have installed Go on my server using the golang repo for CentOS 6.4. The paths are set correctly and I can run go version. When I try to download the package below I receive this error. Any help is appreciated

go get github.com/fiorix/freegeoip
# github.com/fiorix/freegeoip
cannot create <nil>/go.o: No such file or directory

答案1

得分: 6

在搜索该错误时,我找到了一个帖子,建议这可能是在go get期间检测到缺少TMPDIR环境变量的错误。运行export TMPDIR=/tmp应该可以解决问题。

参考链接:
https://groups.google.com/forum/#!topic/golang-dev/LnxmgwB0r3Q

英文:

googling that error I came across a thread that suggests that this is a bug with detecting a missing TMPDIR environment variable, for compiling the source during go get.

run export TMPDIR=/tmp and it should work.

See here:
https://groups.google.com/forum/#!topic/golang-dev/LnxmgwB0r3Q

huangapple
  • 本文由 发表于 2014年3月4日 05:16:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/22157629.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定