GO solved using bee tools, newspaper bash: bee: command not found

I recently use beego, encounter the following problems: command not found
when using vscode, running bee run, reported the following error

 

How to solve?

This situation usually occurs often in the windows, Apple did not encounter this problem, there will be environmental problem, often modified GOPATH. Go msi such as the default installation will configure the environment variable, but we do not want to put the source code on the C drive, and therefore changes GOPATH, then there may be more problems.

 

1. First of all, I GOPATH changed, changed to the following (My Computer, right-attribute)

 

 

To change which disk, with you, the first step can not do it, but you have to know where your GOPATH things point to

 

2. We do the following in bash

 

$ go get -u github.com/astaxie/beego
$ go get -u github.com/beego/bee

  

3. Next, it is important, due to the implementation of the above two lines of command, so GOPATH the bin will generate bee.go

 

 The reason why the report command not found, because although you bee.exe tools are installed, but since the windows can not find, how to set?

 

Open system environment variables, find the path, double-click to open, press the home key, the cursor will appear at the top, set the following

 

%GOPATH%\bin;

 

 

Set up ~

 

Then, we try again

 

vscode:

Remember to restart vscode! !

 

 

 

 

success!

 

Guess you like

Origin www.cnblogs.com/ww01/p/10994176.html