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

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

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

安装

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

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

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

src/github.com/astaxie/beego/

src/github.com/beego/bee/

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

然后执行命令:

go install github.com/astaxie/beego

go install src/github.com/beego/bee

创建项目如下:

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

《centos 搭建go应用beego失败错误处理》 总结先关命令:

/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 &

    原文作者:醉于麦田
    原文地址: https://www.jianshu.com/p/2c044ef5f81c
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞