英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论