Today to use the Beego framework, in the installation environment encountered a lot of small white errors, here to share my mistakes, to avoid more like me small white walk so many detours
Install the Environment first:
Official documents
go get github.com/beego/bee
The next one is to enter bee to see the installation, but all this requires the correct environment configuration
My situation:
After entering the command, no response, then enter Bee, Bee is not a command ...
Then open the browser search, the first is the go get command to download the package will be placed in the GOPATH/SRC directory
I looked under my Gopath directory and found that it didn't exist at all!
Quickly create a good directory, and then run the command again, bee package is still not downloaded successfully, so I carefully looked at my gopath path, found
Incredibly a
$GOPATH! Since Gopath is not my configuration, I don't know how the previous $ sign came ...
Change it, run the go get github.com command again.
Beego package successfully downloaded, but there is still no Bee.exe program in Gopath\bin directory
Go get performs two actions: Download the package from the remote repository to the GOPATH/SRC directory
Then use the Go Install command to compile the downloaded package
So there is no bee.exe, there is a problem in go install, so I manually go install
The information is as follows:
I can't find a whole bunch of existing packages, and I'll look at the path:
。。。
I this two goods map convenient to add the bin path directly behind the Goroot, and then the path inside directly%goroot%
No wonder go install can't find the package.
Fix it, run it again, compile it successfully
Bee Command runs successfully
Summarize:
When using the GO command error, no effect, most of the time the environment variable is wrong
Careful troubleshooting of environmental variables general problems can be solved.
93 Reads