想在自己的Cubietruck上部署一个Gogs服务,搭建了Go语言环境后,Gogs无法编译通过。再加上自己对Go不熟悉,始终没有安装成功。
我的环境是:
OS: Lubuntu Server 13.09 硬件:Cubietruck (即Cubieborad 3,CPU是 Arm 的) Go:1.4.2,从github上下载下来源码编译的 Git: 1.8.1.2 Gogs: 0.6.1,也是从github上下载下来源码,其中Gogs各种依赖包都有。
Go语言环境配置:
#Golang classpath export GOROOT=/home/git/go export GOBIN=$GOROOT/bin export GOARCH=arm export GOOS=linux export PATH=$GOROOT/bin:$PATH export GOPATH=/home/git/app
## Go 1.3.3 git@cubietruck:~/app/src/github.com/gogits/gogs$ go build # github.com/gogits/gogs/routers/user Boffset: unknown state 0 Bseek: unknown state 0 Bseek: unknown state 0 Boffset: unknown state 0 Boffset: unknown state 0 Bseek: unknown state 0 # github.com/gogits/gogs/routers routers/home.go:14: import $WORK/github.com/gogits/gogs/routers/user.a: not a package file # github.com/gogits/gogs/routers/dev Boffset: unknown state 0 Bseek: unknown state 0 Bseek: unknown state 0 Boffset: unknown state 0 Boffset: unknown state 0 Bseek: unknown state 0 # github.com/gogits/gogs/routers/org Boffset: unknown state 0 Bseek: unknown state 0 Bseek: unknown state 0 Boffset: unknown state 0 Boffset: unknown state 0 Bseek: unknown state 0 # github.com/gogits/gogs/routers/repo Boffset: unknown state 0 Bseek: unknown state 0 Bseek: unknown state 0 Boffset: unknown state 0 Boffset: unknown state 0 Bseek: unknown state 0 # github.com/gogits/gogs/routers/api/v1 routers/api/v1/repo_file.go:11: import $WORK/github.com/gogits/gogs/routers/repo.a: not a package file
后来我把Go语言升级到1.4.2,再次编译Gogs,也没有编译通过,情况如下:
## Go 1.4.2 git@cubietruck:~/app/src/github.com/gogits/gogs$ go build # github.com/gogits/gogs/routers/user Boffset: unknown state 0 Bseek: unknown state 0 # github.com/gogits/gogs/routers Boffset: unknown state 0 Bseek: unknown state 0 Bseek: unknown state 0 Boffset: unknown state 0 Boffset: unknown state 0 Bseek: unknown state 0 # github.com/gogits/gogs/routers/dev Boffset: unknown state 0 Bseek: unknown state 0 Bseek: unknown state 0 Boffset: unknown state 0 Boffset: unknown state 0 Bseek: unknown state 0 # github.com/gogits/gogs/routers/repo Boffset: unknown state 0 Bseek: unknown state 0 Bseek: unknown state 0 Boffset: unknown state 0 Boffset: unknown state 0 Bseek: unknown state 0 # github.com/gogits/gogs/routers/org Boffset: unknown state 0 Bseek: unknown state 0 Bseek: unknown state 0 Boffset: unknown state 0 Boffset: unknown state 0 Bseek: unknown state 0 # github.com/gogits/gogs/routers/api/v1 routers/api/v1/repo_file.go:11: import $WORK/github.com/gogits/gogs/routers/repo.a: not a package file
相比较Go1.3.3下,少了一个报错提示,上网也查了些资料,没有找到相关的解决方法。不知道怎么解决,求指导,谢谢。
还有,官方只提供了64们的编译二进制文件,希望也提供下32位的,因为既然是自托管服务,像现在有太多玩开发版的卡片电脑的,这样的话也更方便,更符合Gogs的初衷。@无闻
hi不好意思回晚了。。。。。
是有点晚。。
第二次你升级到1.4.2的就错误来看是没有删除旧版编译时的.a文件,也就是$GOPATH/pkg下的文件。。
回复 @Sleepwalke:恩。。我得找个ARM的机子。。也编译下。。嘿嘿哈。没事。我实在没编译过,后来凑巧遇到一个哥们环境和我一样,都用的arm的开发版,我就把他的拷过来用了。不过希望还是可以提供一个armlinux下的二进制,这不正好和官网上说的在树莓派上也轻松部署的嘛,希望采纳。[13]版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。