Go path configuration error x-link

Source: Internet
Author: User

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
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.