bee: command not found

0 篇文章 0 订阅

根据beego官网资料,如下:

Windows 平台下输入:

>cd %GOPATH%/src
>bee new hello
>cd hello
>bee run hello

运行:bee new hello 的时候出现 bee:command not found 错误。

这时我们需要切换到 bee目录,运行 go build 命令;如果运行成功会生成bee.exe 文件

当时没这么幸运 go build 运行失败,并提示: cannot find package "github.com/smartystreets/goconvey/convey" in any of:

这时试着运行 go get github.com/smartystreets/goconvey 命令还是出错:can't load package: package github.com/smartystreets/goconvey: no buildable Go source files in %GOPATH% \src\github.com\smartystreets\goconvey

直接在浏览器打开 github.com/smartystreets/goconvey 是有这个项目的,

解决方法:下载 github.com/smartystreets/goconvey 解压并复制全部文件到 %GOPATH% \src\github.com\smartystreets\goconvey;运行 go get github.com/smartystreets/goconvey,此时再运行 go build 成功生成 bee.exe

注意:运行bee带上完整地址  ./github.com/beego/bee/bee new hello

最后,运行:go run hello/main.go 项目成功运行此时可以打开欢迎页面 http://127.0.0.1:8080/

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值