dongliang2005 2015-04-11 10:23
浏览 36

./make.bash ubuntu-> windows的Go lang安装问题

I have tried to search and found a lot of topics which are related to my problem, but none of them I could follow to success. I can go run and go get with no issues, but I need to compile into windows and there I have problems please see bellow

mikhail@mikhail-desktop:/usr/lib/go/src$ sudo ./make.bash 
# Building C bootstrap tool.
cmd/dist
go tool dist: $GOROOT is not set correctly or not exported
    GOROOT=/usr/share/go
    /usr/share/go/include/u.h does not exist
mikhail@mikhail-desktop:/usr/lib/go/src$ go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mikhail/Documents/FL/0go"
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
TERM="dumb"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CXX="g++"
CGO_ENABLED="1"
mikhail@mikhail-desktop:/usr/lib/go/src$ 

By some reasons it thinks the GOROOT is /usr/share/go while it actually /usr/lib/go

  • 写回答

2条回答 默认 最新

  • duanli6618 2015-04-11 18:09
    关注

    I think it somehow connected to Debian/Ubuntu thing. I seen such issues but related to 0.9. version.

    I have installed go from source into ~/go and then everything went quite OK, now I can compile to windows from ubuntu with help Introduction to cross compilation with go and LiteIDE.

    评论

报告相同问题?

悬赏问题

  • ¥15 在获取boss直聘的聊天的时候只能获取到前40条聊天数据
  • ¥20 关于URL获取的参数,无法执行二选一查询
  • ¥15 液位控制,当液位超过高限时常开触点59闭合,直到液位低于低限时,断开
  • ¥15 marlin编译错误,如何解决?
  • ¥15 有偿四位数,节约算法和扫描算法
  • ¥15 VUE项目怎么运行,系统打不开
  • ¥50 pointpillars等目标检测算法怎么融合注意力机制
  • ¥20 Vs code Mac系统 PHP Debug调试环境配置
  • ¥60 大一项目课,微信小程序
  • ¥15 求视频摘要youtube和ovp数据集