Anders Andersen
Anders Andersen

Reputation: 2477

Bee command not found

I just started learning golang and beego. Yesterday I installed golang and bee. I had alot off trouble getting bee command in command line to work. At a point it started to work.

Today I wanted to continue development. But again it cant find bee command. As far as I know its something with the PATH variable. But everything seems to be right.

Here comes the different informations you might need to help.

Go is installed and works. Go is installed in:

/usr/local/go

My project folder for go development is placed in my documents folder:

/Users/Anders-air/Documents/go

in this folder i have both bin and src. Src contains my project and packages. And inside bin you will find bee (Unix Executable File)

My bash_profile

export GOPATH=/Users/Anders-air/Documents/go
export PATH=$PATH:/Users/Anders-air/Documents/go/bin

Hopes someone can help. By the way I am use OSX.

Upvotes: 4

Views: 8258

Answers (5)

Anatoliy Poliakov
Anatoliy Poliakov

Reputation: 11

my solution on ubuntu 22.04:

  1. run command: go env GOPATH, you will see string like /home/{username}/go, open this directory
  2. open directory bin, if beego installed you should see file bee in this dir
  3. open file ~/.bashrc in any text editor (sudo nano ~/.bashrc) and put following string: export PATH=$PATH:$HOME/go/bin
  4. save and close editor
  5. reload your shell configuration by running: source ~/.bashrc
  6. restart your terminal and run: bee version

Upvotes: 1

Aravind Siruvuru
Aravind Siruvuru

Reputation: 1079

It depends on which shell you are using. You have to add the variable to the configuration file of your terminal.

In my case, I'm using zsh/zshrc.

try this:

go install  github.com/beego/bee/v2@latest

nano ~/.zshrc

Add the lines below, and save the file.

export GOPATH="$HOME/go"
export PATH="$GOPATH/bin:$PATH"

Close and re-open the terminal Now, you should be able to run bee version

Upvotes: 3

little xian
little xian

Reputation: 41

You should have a path variable named GOBIN, and its path is the bin of your go root path. Run:

go install github.com/beego/bee

then bee cmd can be used

Upvotes: 4

郭友进
郭友进

Reputation: 111

vim .bashrc insert

export GOROOT=/usr/local/Cellar/go/1.7.4/libexec
export GOPATH=$HOME/GoLang
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin

Upvotes: 4

Anders Andersen
Anders Andersen

Reputation: 2477

It seems like the bee has been removed or not installed the correct way. After running the get command again everything works.

Upvotes: 0

Related Questions