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

开门见山,首先,我的服务器已经安检了应有的软件, 如: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 &

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 申金鑫 17101223365 转载自公众号flysnow_org 【嵌牛导读】:本文介绍了各种系统下的Go语言环...
    Felixxin阅读 3,405评论 0 20
  • GoLang-Beego.Godep 介绍你是一个从PHP,Python,Ruby等动态语言转移到Go的web应用...
    燕京博士阅读 1,210评论 0 3
  • afinalAfinal是一个android的ioc,orm框架 https://github.com/yangf...
    passiontim阅读 15,591评论 2 45
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,026评论 19 139
  • 1 两根手指能做什么? 躺在舒服柔软的床上,可口的食物和饮料放在手边,眼前是屏幕,闪烁着游戏或者电影的画面。两根手...
    园游不惊梦阅读 875评论 0 1