未找到命令”bee”。

huangapple go评论97阅读模式
英文:

No command 'bee' found

问题

我正在尝试运行一个使用beego框架的项目。每次尝试运行项目时,都会遇到以下问题:

找不到命令 'bee',你是不是想说:
 来自软件包 'belier' 的命令 'bel' (宇宙)
 来自软件包 'bbe' 的命令 'bbe' (宇宙)
 来自软件包 'moreutils' 的命令 'pee' (宇宙)
 来自软件包 'beep' 的命令 'beep' (宇宙)
 来自软件包 'ree' 的命令 'ree' (宇宙)
 来自软件包 'beets' 的命令 'beet' (宇宙)
 来自软件包 'ben' 的命令 'ben' (宇宙)
 来自软件包 'gerstensaft' 的命令 'beer' (宇宙)
 来自软件包 'bugs-everywhere' 的命令 'be' (宇宙)
 来自软件包 'mime-support' 的命令 'see' (主要)
 来自软件包 'coreutils' 的命令 'tee' (主要)
 来自软件包 'ruby-bcat' 的命令 'btee' (宇宙)
 来自软件包 'beef' 的命令 'beef' (宇宙)
bee: 找不到命令

我的Go环境:($ go env)

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/MYNAME/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build235821315=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

我的bash_profile中的环境变量声明:

PATH="$HOME/bin:$HOME/.local/bin:$PATH"
export GOPATH=$HOME/work
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
export PATH="$GOPATH/bin:$PATH"

我做错了什么?我应该怎么做?

英文:

I am trying to run a project that uses beego framework. When I try to run the project I encounter the following problem every time.

No command 'bee' found, did you mean:
 Command 'bel' from package 'belier' (universe)
 Command 'bbe' from package 'bbe' (universe)
 Command 'pee' from package 'moreutils' (universe)
 Command 'beep' from package 'beep' (universe)
 Command 'ree' from package 'ree' (universe)
 Command 'beet' from package 'beets' (universe)
 Command 'ben' from package 'ben' (universe)
 Command 'beer' from package 'gerstensaft' (universe)
 Command 'be' from package 'bugs-everywhere' (universe)
 Command 'see' from package 'mime-support' (main)
 Command 'tee' from package 'coreutils' (main)
 Command 'btee' from package 'ruby-bcat' (universe)
 Command 'beef' from package 'beef' (universe)
bee: command not found

My Go Environment : ($ go env)

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/MYNAME/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build235821315=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

My Environment declerations in bash_profile :

PATH="$HOME/bin:$HOME/.local/bin:$PATH"
export GOPATH=$HOME/work
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
export PATH="$GOPATH/bin:$PATH"'

Where am i doing wrong? What should i do?

答案1

得分: 2

bee在Go中不是默认可用的,您需要使用go get命令或手动将其复制到$GOPATH/src$GOPATH中进行安装,具体步骤如下:

go get github.com/beego/bee
英文:

As bee is not available by default in Go, you have to install it first using go get command or copying it manually to $GOPATH/src or $GOPATH, as follows:

 go get github.com/beego/bee

huangapple
  • 本文由 发表于 2017年8月22日 00:18:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/45801697.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定