美文网首页
centos 搭建go应用beego失败错误处理

centos 搭建go应用beego失败错误处理

作者: 醉于麦田 | 来源:发表于2018-03-22 22:09 被阅读0次

开门见山,首先,我的服务器已经安检了应有的软件, 如:gift,golang的环境,而且环境变量都是好的!

安装

beego 包含一些示例应用程序以帮您学习并使用 beego 应用框架。

您需要安装 Go 1.1+ 以确保所有功能的正常使用。

你需要安装或者升级 Beego 和 Bee 的开发工具:

$ go get -u github.com/astaxie/beego

$ go get -u github.com/beego/bee

下面是安装的时候出现的错误

# cd .; git clone https://github.com/astaxie/beego /alidata/www/go_workspace/src/github.com/astaxie/beego

Initialized empty Git repository in /alidata/www/go_workspace/src/github.com/astaxie/beego/.git/

error:  while accessing https://github.com/astaxie/beego/info/refs

fatal: HTTP request failed

package github.com/astaxie/beego: exit status 128

如果在网络上面都没法解决,最笨的办法就是下载源码安装,

下载链接:https://github.com/astaxie/beego

                  https://github.com/beego/bee

把两个源码放在下面对应的目录

src/github.com/astaxie/beego/

src/github.com/beego/bee/

然后执行命令:

go install github.com/astaxie/beego

go install src/github.com/beego/bee

创建项目如下:

总结先关命令:

/alidata/www/go_workspace/src/beego/bee

/alidata/www/go_workspace/src/github.com/astaxie/beego

/alidata/www/go_workspace/src/github.com/beego/bee

export GOROOT=/alidata/server/go

export GOBIN=$GOROOT/bin

export PATH=$PATH:$GOBIN

export GOPATH=/alidata/www/go_workspace/

go install  github.com/astaxie/beego

go install  github.com/beego/bee

nohup ./go_zhanj163 &

相关文章

网友评论

      本文标题:centos 搭建go应用beego失败错误处理

      本文链接:https://www.haomeiwen.com/subject/mhvzqftx.html